TheSwamp

Code Red => .NET => Topic started by: gablackburn on January 20, 2012, 11:54:47 AM

Title: Getting a Point3DCollection of specific osnaps
Post by: gablackburn 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
Title: Re: Getting a Point3DCollection of specific osnaps
Post by: gile 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.
Title: Re: Getting a Point3DCollection of specific osnaps
Post by: gablackburn 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.