marcio Posted September 7, 2012 Posted September 7, 2012 Hi I´m trying to get all objects inside a block, but I cannot find the objects. Can you help me? I´m using the VB.NET and have the following rotine: For Each acSSObj As SelectedObject In acSSet If Not IsDBNull(acSSObj) Then Dim acEnt As Entity = acTrans.GetObject(acSSObj.ObjectId, OpenMode.ForRead) If TypeOf acEnt Is BlockReference Then Dim oBr As BlockReference = CType(acEnt, BlockReference) ''I need to list all vertex of Polyline inside the block!!! End If End If Next Can you help me? Thanks a lot Márcio Quote
SEANT Posted September 7, 2012 Posted September 7, 2012 There are a few ways of approaching this: Retrieve the Block Table Record that the INSERT references, then iterate through that collection. The routine would have to account for all the Transforms applied to the INSERT to recreate the exact geometry. or Explode the Insert, then iterate through the remnants. With both methods, it may be necessary to do that process recursively depend on the level of nesting. The other option would be the use of Editor.GetNestedEntity. It requires more user interaction, but simplifies the geometry retrieval. Quote
marcio Posted September 8, 2012 Author Posted September 8, 2012 Dear Seant Thank you for your help. In realy, finaly I sove my problem. I got the block position and scale, then apply to the entity inside the block. Quote
SLW210 Posted September 10, 2012 Posted September 10, 2012 marcio, Please read the CODE POSTING GUIDELINES and edit your post to include code tags. Quote
OmarSuliman Posted January 7, 2015 Posted January 7, 2015 Hi Micro, I have the same problem, can you help me with your code. thanks Quote
Recommended Posts
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.