- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am trying to create points using the start point and end point of an existing line using VBA. The line is stored in an array called 'entityArray'
I initially tried to access this using the object qualifier:
P1(0) = entityArray.entityArray(0).StartPoint.StartPoint(0)
P1(1) = entityArray.entityArray(0).StartPoint.StartPoint(1)
P1(2) = entityArray.entityArray(0).StartPoint.StartPoint(2)
this returns an invalid object qualifier error.
My section of code:
Private Sub Create3DFace(ss As AcadSelectionSet)
Dim entityArray As Variant
entityArray = CreateEntityArray(ss)
Dim P1(0 To 2) As Double
Dim P2(0 To 2) As Double
Dim P3(0 To 2) As Double
Dim P4(0 To 2) As Double
' Define the four points of the face (X, Y, Z)
P1(0) = entityArray.entityArray(0).StartPoint.StartPoint(0)
P1(1) = entityArray.entityArray(0).StartPoint.StartPoint(1)
P1(2) = entityArray.entityArray(0).StartPoint.StartPoint(2)
Solved! Go to Solution.