Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to write some code that examines each vertex of a solid and filters out all vertices that are not on the XY Plane. I'm having trouble storing the "good" vertices for later use.
Sub AnalyzeSolid() Dim oVertex As Vertex Dim logVertices() As Point2d Dim vCount As Integer vCount = 0 'Filter out all except Z=0 points For Each oVertex In oSolid.Vertices() If oVertex.Point.Z = 0 logVertices(vCount)= oTG.CreatePoint2d(oVertex.Point.X,oVertex.Point.Y) vCount = (vCount + 1) End If Next End Sub
My "storage" object [logVertices] is not referenced correctly, and gives error: "Object reference not set to an instance of an object." I don't know what I should be using to collect a batch of 2D Points. Any help would be appreciated.
Solved! Go to Solution.