Author Topic: Getting a Point3DCollection of specific osnaps  (Read 1483 times)

0 Members and 1 Guest are viewing this topic.

gablackburn

  • Guest
Getting a Point3DCollection of specific osnaps
« on: January 20, 2012, 11:54:47 AM »
I'd like to get a Point3DCollection of all the endpoints of lines in a particular layer but I haven't found a way to do it.

I can figure out how to do it for blocks, but up until this point, I've never needed it for osnaps.

Code: [Select]
Dim myEndPtColl As New Point3dCollection
Dim myPointFilter(1) As DatabaseServices.TypedValue
myPointFilter(0) = New DatabaseServices.TypedValue(DatabaseServices.DxfCode.LayerName, "WALLS")
myPointFilter(1) = New DatabaseServices.TypedValue(DatabaseServices.DxfCode. ????? OSMODE 1 ?????)

Is this possible or am I going about this the wrong way?

Thanks in advance,
G.A. Blackburn

edit:  PS - I'm using VB.NET

gile

  • Gator
  • Posts: 2507
  • Marseille, France
Re: Getting a Point3DCollection of specific osnaps
« Reply #1 on: January 20, 2012, 04:28:41 PM »
Hi,

It looks like you're going the wrong way. You cannot select "EndPoints" only entities as lines.
So, select the lines, then iterate through the selection to get each line EndPoint.
Speaking English as a French Frog

gablackburn

  • Guest
Re: Getting a Point3DCollection of specific osnaps
« Reply #2 on: January 26, 2012, 12:41:56 PM »
Thanks for the response gile, sorry it took so long but I was out of town.   Although I didn't post the code, I will be creating a selection set of all the lines in the WALLS layer.  I'll see if I can cycle through to get the 3D coordinates of the endponts.