Extracting X and Y coords from a point variable

#1
Hello again

I am having trouble trying to extract the x and y coordinates from a point variable and wondered if you could let me know how to do it.

On AutoCAD i could use the translatecoordinates function in this routine

Dim DblConv as Variant
Public Function ConvPoint(StartPoint as ACAD_POINT)

Dim StartX, StartY as Double

DblConv = thisdrawing.utility.translatecoordinates(StartPoint,acWorld,acWorld,False)

StartX = DblConv(0)
StartY = DblConv(1)

End Function

i have changed the acad object references to intellicad ones but the function errors on the line

StartX = DblConv(0)

Can you please help

ENSIGN

#2
ENSIGN,

Look at the VBA Object Model in ICAD and the help files.

ICAD has a Point Object.

This means that PointObject.x is the x coordinate and PointObject.y is the y coordnate.

ACAD uses an array of doubles.

------------------
Regards
John Finlay