For KotOR I, you can get the XYZ co-ordinates by typing "whereami" (without the quotes) into the console. However, this won't give you the bearing or orientations. For that, I use Star Admiral's K1 Utility Armbands (
http://knightsoftheoldrepublic.filefront.com/file/;100418). This mod contains an armband which will give you the XYZ co-ordinates as well as the bearing and orientations. This is based on Darth333's whereami armband for KotOR II.
For KotOR II, use Darth333's whereami armband, which will give you XYZ co-ords, as well as the bearing and orientation. The console in K2 is invisible, which is why you can't use it to find the co-ordinates.
Now, why do you need bearing and orientations? Briefly, the Bearing is used for placeables, while the XOrientation and YOrientation are used for creatures. IIRC, Darth333's armband doesn't always give the orientations accurately, so you may alsow ant to use Glovemaster's AngleToVector Calculator (
http://knightsoftheoldrepublic.filefront.com/file/Angle_to_Vector_Calculator;98733).