Explode Method Help

Explode Method Help

HJohn1
Advocate Advocate
519 Views
2 Replies
Message 1 of 3

Explode Method Help

HJohn1
Advocate
Advocate
Can someone explain or give me an example of how to explode polylines into lines and arcs? I need to go through a selection set and explode any polynes or lwpolynes (in .NET I don't know if they are different), but I can't find a way of making this work. Thanks for any help.
0 Likes
520 Views
2 Replies
Replies (2)
Message 2 of 3

chiefbraincloud
Collaborator
Collaborator
This is really quite simple, so I'm guessing your missing some small detail.

Assuming you are using the managed references acmgd.dll and acdbmgd.dll, and transactions, you will be looping or enumerating through your selection set and checking the type of each object. Once you have an object of type Polyline or Polyline2d, you need a variable of DBObjectCollection to pass to the explode method, and you just do Pline.Explode(ObjCollection).

What you end up with now is ObjCollection has TEMPORARY entites in it from the explode, and Pline is still Database resident. So if you want to keep the exploded entities, you have to append them to the modelspace, paperspace, or a block, and if you don't want the original polyline to remain, you have to erase it.

this code won't run until you fix it for your stuff, as in some things in this code are declared elsewhere in my code, and you'll have to replace those references with yours.
Dave O.                                                                  Sig-Logos32.png
0 Likes
Message 3 of 3

HJohn1
Advocate
Advocate
Thank you David, your reply was very helpful and really appreciated.
0 Likes