Jump to content

Selection Within a Block


AGove4123Sonnnnn

Recommended Posts

I need a way to select everything but the centerlines within a block. They extend beyond the part which I hope to find the actual envelope dimensions of. I will then iterate through the remaining parts to find the max/envelope dimensions.

 

The issue is this block is in a document with many other objects (blocks, lines, points, etc.) so exploding is not ideal as it would be a pain to recollect the parts. Also opening a seperate file is too time consuming, this must be done within the file at hand.

 

Is this even possible?

 

 

EDIT:

Oh! A little drilling, and you can easily and directly access a block within a document, then iterate through them as I mentioned above. No inception-style selection sets needed! Nice.

Looks very roughly like this:

 

Dim blkTestBlock As AcadBlock

Set blkTestBlock = AutoCAD.Application.ActiveDocument.Blocks("ACT1")

For Each ACADEntity in blkTestBlock

If linetype="Continuous" then

getboundingbox....blahblahblah

Edited by AGove4123Sonnnnn
Solution Reached
Link to comment
Share on other sites

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...