# Coordinate Axis Direction

Discussion created by navjohn on Nov 1, 2012
Latest reply on Nov 9, 2012 by navjohn
This is almost a philosophical question. I have a 3D object in ArcScene which has been created by someone else (the User).

ESRI does not provide any indication of the X,Y,Z axis directions in ArcScene but I need to know this so I can align labels.

The Problem:

I can find a point on the 3D plan by scanning the screen using m_pSxDoc.Scene.SceneGraph.Locate(iXpix, iYpix...pPoint...)
If pPoint comes back with a value then it means a point on the map has been found. The return point has (X,Y,Z) coordinates.

I then get the coordinates of the point located one pixel to the right. This is done to find which axis is the one running left-right on the screen. If Xo <> X1 and Yo = Y1 and Xo = X1 then the left-right axis is the one which uses the first coordinate in the point coordinates.

Do the same again taking a pixel up to get the up-down axis.

This process works fine if the point found is on a plane parallel to one of the coordinate planes.
It is not often the case that the first point found is on a parallel plane. The whole drawing may not have a single parallel plane in it.

OK I thought. The chances of finding a parallel plane are slim so just generate one and use that. I did this (using ArcObjects) and then realised that to construct the plane you have to assume a set of X,Y,Z coordinate directions. Any queries on that plane will just find the directions assumed for it's construction. Bomb out.

The Question:

How do I find the left-right, up-down and front-back axis directions from a set of point coordinates?