Jump to content

Recommended Posts

Posted

Hi

 

Could someone throw some advice my way with the select by polygon method of creating selection sets. Or more precisely creating proper point lists

 

On one layer i have on type of attribute block and a group of closed polylines

 

each polyline (lwpoly) has an attribute block inside it. I have been using the acadlwpolyline.Coordinates property to gather the points for the sset. I have a function to add the z coordinate The result is somewhat sporadic many of the points end up on the wcs origin either on the x or y but never off the origin on the z

 

any thoughts would be welcome

 

Cheers

Ollie

Posted

It sounds like the routine needs to account for OCS coordinates. The phrase “add the z coordinate” implies the LWPoly is not on the WCS XY plane, but if it also means that the Poly is not parallel then the acadlwpolyline.Coordinates must be translated back to WCS coords via:

 

ThisDrawing.Utility.TranslateCoordinates(dblCoord, acOCS, acWorld, 0, dblNormal)

 

Where dblCoord is is a composite of the Polylines 2D coordinate pair and elevation (Xcoord, Ycoord, Elevation), and dblNormal is acadlwpolyline.Normal.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...