benhubel Posted July 17, 2017 Share Posted July 17, 2017 My lisp program runs the offset command, then immediately uses entlast to get the newly created polyline and add it to a selection set. There is a bug using this method, though, since offset creates multiple entities any time the offset distance is large enough to make it collide with itself. I am trying to find a way to get those additional polylines, but entlast only grabs the most recent. I am at a loss. The only things I can think of right now are to either write my own custom offset routine or to select everything in the drawing before and after the offset, then deselect the selection from before. Both methods sound inefficient. Does anybody have a better way of going about this? I found a few posts where people asked similar questions about this problem, but each one found a workaround specific to their case instead of addressing the issue of getting more than one recent entities which are output at the same time. For reference, here is what I'm talking about by multiple entities being created when it self-intersects: Quote Link to comment Share on other sites More sharing options...
Grrr Posted July 17, 2017 Share Posted July 17, 2017 This thread may help you. Quote Link to comment Share on other sites More sharing options...
benhubel Posted July 17, 2017 Author Share Posted July 17, 2017 Thank you. It appears to be a bit over my head, but it seems to be exactly what I was hoping for. I'll look it over and see if I can figure out what to make of it. Quote Link to comment Share on other sites More sharing options...
ronjonp Posted July 17, 2017 Share Posted July 17, 2017 You could also use vla-offset then all the items created would be stored as a list of vla-objects. Quick one liner (vlax-invoke (vlax-ename->vla-object (car (entsel))) 'offset (getdist)) ;; Returns ;; (#<VLA-OBJECT IAcadLWPolyline 0000022d161fa478> #<VLA-OBJECT IAcadLWPolyline 0000022d161fb5b8>) Quote Link to comment Share on other sites More sharing options...
benhubel Posted July 17, 2017 Author Share Posted July 17, 2017 You could also use vla-offset then all the items created would be stored as a list of vla-objects. I had no idea that vla-offset even existed. I'm surprised I've never heard of it before now. I'll definitely be checking that out, whether I use it here or not. **Edit** To be fair, I haven't had the chance to do too much with VLA in the first place. I think I should put more time into learning it. Quote Link to comment Share on other sites More sharing options...
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.