ElCidCampeador Posted July 31, 2017 Posted July 31, 2017 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 Quote
RICVBA Posted August 2, 2017 Posted August 2, 2017 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) Quote
BIGAL Posted August 3, 2017 Posted August 3, 2017 Like RICVBA look at the help for ssget "W" "F" "CP" this is lisp but the same in VBA 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.