CoalCad Posted December 26, 2022 Posted December 26, 2022 Hello Smart friends, Looking for a lisp where I can select multiple objects and any objects that are overlapping and the same color get grouped together. I have hundreds of these "arrows" in a dwg that I need individually grouped or block referenced. So they're easier to move and rotate in the future. Thanks so much for any advise!! arrows.dwg Quote
BIGAL Posted December 27, 2022 Posted December 27, 2022 Various comments. Not sure but Bricscad has Blockify that makes objects into blocks. You could get the outer boundary of the "arrows" which will be a pline and make a block then hatch. Another I think I have is draw an arrow which is 1 object. Just enter like start and end point. It may be a dynamic block. So just enter a couple of lengths and arrow is drawn. 2 Quote
Dadgad Posted December 27, 2022 Posted December 27, 2022 (edited) wblock command in AutoCad, as I recall, would be the equivalent. Stands for Write Block I believe. Lots of available options. Edited December 27, 2022 by Dadgad Quote
CyberAngel Posted December 27, 2022 Posted December 27, 2022 If I understand the OP's question correctly, they want an algorithm that detects a recurring set of objects and converts each one to an instance of a block with the proper location, size, and rotation. I don't have the time or the expertise to write that algorithm, but maybe someone else here does. Quote
CoalCad Posted December 27, 2022 Author Posted December 27, 2022 Cyber Angel, You are correct, I have a large drawing that has multiple arrows that have been ungrouped, or exploded. I am looking for an algorithm where I can isolate the layer (with the arrows) and it will individually group (or create a block) of any entity touching or overlapping. Im trying to explain it the best I can. Thanks Quote
BIGAL Posted December 28, 2022 Posted December 28, 2022 (edited) Thats what I was hinting you can get the outline of the arrows as a pline and make it a block with a solid hatch, next step would be to find similar arrows can be done as a select 1 by one pretty easy. Doing an auto all say by layer, would be difficult. O yeah a critical step is to rotate the 1st select objects to the X direction. Ok a question how where they made, a way better way is to make correct arrow blocks to start with. If they are made with other lisp code post it and can probably be fix it. Making a block that does not exist, code does exist. Edited December 28, 2022 by BIGAL Quote
CoalCad Posted December 28, 2022 Author Posted December 28, 2022 Not sure how the arrows were made, I'm working in a map thats 15 years old. So when we make a new arrow we just copy and paste. If there's a lisp that can make a arrow in the correct way, quickly I'm all ears. Thanks! Quote
BIGAL Posted December 29, 2022 Posted December 29, 2022 (edited) Ok if happy with make a arrow why would you not just make a block and save that for future use, Arrow1, Arrow2 and so on. You can save each arrow to separate dwg or save in a DWT or use say Lee-mac Steal.lsp to pull from another dwg. Here is how I made an arrow block explained in more detail. 1st step was I rotated the block to a X axis 2nd drew a random pline around the arrow 3rd did BPOLY picking point inside 4th moved Last object to right side 5th turned into a block with solid hatch and set objects to byblock. Change size etc if required. I set the insertion point to the mid pt of the start end. Edited December 29, 2022 by BIGAL 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.