Extracting Coords from Points


We get a dxf. with a series of points from a survey. I am looking to extract the coordinates from those points so I can sort them into groups for manipulation, but I cant seem to get the coordinates out if 'Point' or 'PointEntity'.

Code: Select all

Dim objENT As IntelliCAD.PointEntity
Dim ssetObj As SelectionSet
Set ssetObj = ActiveDocument.SelectionSets.Add("MySS54")
Dim xCoord() As Double
Dim yCoord() As Double
Dim zCoord() As Double

ssetObj.Select vicSelectionSetAll
count = ssetObj.count

ReDim xCoord(count) As Double
ReDim yCoord(count) As Double
ReDim zCoord(count) As Double

index = 0                                               'Extract Coordinates from existing Points
    For Each objENT In ssetObj
        If objENT.EntityName = "Point" Then
            xCoord(index) = objENT.Coordinates(0)
            yCoord(index) = objENT.Coordinates(1)
            zCoord(index) = objENT.Coordinates(2)
            index = index + 1
'            Debug.Print CSng(xCoord(index))
'            Debug.Print CSng(yCoord(index))
'            Debug.Print CSng(zCoord(index))
        End If
    Next objENT
Any help would be appreciated. Ive tried that same syntax with:

Code: Select all

I get the same result.

I'm using objENT as a PointEntity because using Point gives me issues with the selection set.