Jump to content
ElCidCampeador

Exclude from macro a specific area of drawing

Recommended Posts

ElCidCampeador

Is it possible to exclude from a vba macro for Autocad a specific region? For example, apply this macro not to all modelspace but only to a part (which has not lines as boundaries but defined only by position reference x,y in autocad). Thanks

Share this post


Link to post
Share on other sites
RICVBA

I'd go this way:

- check every drawing entity to be handled by the macro against the intersections it has with the "allowed" region perimeter (which is likely to be a polyline)

- if there are no intersections then let the macro operate on that drawing entity

- if there is any intersection then skip that drawing element

 

as a side note for handling intersections, I guess you're working on a 2D model so be sure all elements and the region perimeter has the same "elevation" property

 

 

As an alternative you could use SelectionSet object and select only elements within a certain boundary.

and then have macro operate on every element (if any) of that selection set (just iterate over selection set items)

Share this post


Link to post
Share on other sites
BIGAL

Like RICVBA look at the help for ssget "W" "F" "CP" this is lisp but the same in VBA

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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