Difference of coordinates between PickPoint method and spot coordinates

Difference of coordinates between PickPoint method and spot coordinates

Anonymous
Not applicable
830 Views
4 Replies
Message 1 of 5

Difference of coordinates between PickPoint method and spot coordinates

Anonymous
Not applicable

Hi,

 

I'm trying to retrieve coordinates of points to do a least square treatment. Problem is, when I use the pickpoint method with the API it retrieves coordinates that looks like this :

PickPointMethod.PNG

 

While what I need to retrieve is

 

SpotCoordinate.PNG

 

First column in U is Easting, second is Northing and third is Elevation.

Points are picked in this order : top left, top right, bottom left, bottom right.

 

There seem to be different coordinate systems, one for PickPoint, and one for spot coordinates.

Tell me if I'm wrong but I don't think it's a unit conversion problem between feet and meters since the differences are so huge (my project is in meters).

 

Is there any way to retrieve the values shown by spot coordinates ?

 

Thanks in advance,

 

Jordi

0 Likes
831 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
How exactly are you getting these values from PickPoint? Can you paste a
code snippet?

It's been awhile since I've used pickpoint so I can't remember what kind of
values it returns. The values are suspiciously clustered around zero
though, they look like local view coordinates. You might need to apply the
view transform to get global values.
0 Likes
Message 3 of 5

Anonymous
Not applicable

I just took a closer look a this and realised that PickPoint only reports the selected point as it would be projected onto the current work plane, that could be why you are getting strange values.

 

To get the exact point from a spot coordinate, just cast its Location property as LocationPoint and grab the coords.

 

If you need to pick arbitrary points in 3D you probably want to use PickObject and grab the GlobalPoint property from the returned reference.

0 Likes
Message 4 of 5

Anonymous
Not applicable

Thanks a lot for your answer !

 

Here's how I do it :

 

for (int i = 0; i < rowCount-1; i++)
            {
                pointTempo = uidoc.Selection.PickPoint("Chose a point");
                U[i, 0] = pointTempo.X * 0.3048;
                U[i, 1] = pointTempo.Y * 0.3048;
                U[i, 2] = pointTempo.Z * 0.3048;
            }

 

I'll try to look into the LocationPoint.

 

If you have a small example of this I would apreciate it greatly, since I'm pretty new in the API and programming.

 

Cheers,

 

Jordi

0 Likes
Message 5 of 5

Anonymous
Not applicable

I tried this :

 

Reference pointcalage = uidoc.Selection.PickObject(ObjectType.PointOnElement,
                  "Choisissez un point de calage");
                XYZ coord = pointcalage.GlobalPoint;
                U[i, 0] = coord.X * 0.3048; //+ decalageX;
                U[i, 1] = coord.Y * 0.3048; //+ decalageY;
                U[i, 2] = coord.Z * 0.3048; //+ decalageZ;
            }

 

I couldn't manage to use PickPoint with GlobalPoint or locationPoint. So I can not snap to end points like I want to do.

Also it stills gives me coordinates very close to 0.

 

Jordi

0 Likes