diepvx Posted November 19, 2020 Share Posted November 19, 2020 The task is simple. I have a drawing containing various blocks and a folder containing those blocks that separate in each dwg file . I want to make an auto routine: list all blocks contained in opening dwg > searching them in the library folder > redefine all blocks that containing in the list from the library folder. Please help me, because I couldnt find any existing lisps that be able to solve this problem Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 19, 2020 Share Posted November 19, 2020 You might want to consider the program I posted here: https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-blocks-amp-attributes-lisp/m-p/4423983#M315011 1 Quote Link to comment Share on other sites More sharing options...
marko_ribar Posted November 19, 2020 Share Posted November 19, 2020 (edited) Lee, although the code is very good, I noticed that you reinsert blocks with scales 1.0 (x,y,z) and rotation 0.0... Those things should be inherited from existing blocks in reference DWG that is used for doing this task. ATTSYNC is though very good thing... Also we don't know exact orientation of blocks (WCS, UCS 3d space)... Edited November 19, 2020 by marko_ribar Quote Link to comment Share on other sites More sharing options...
marko_ribar Posted November 19, 2020 Share Posted November 19, 2020 I am not sure, but maybe you are right with inserting 1.0 1.0 1.0 0.0... I suppose it will redefine and automatically inherit orienations... At the end insertion should be removed though IMHO... Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 19, 2020 Share Posted November 19, 2020 5 hours ago, marko_ribar said: Lee, although the code is very good, I noticed that you reinsert blocks with scales 1.0 (x,y,z) and rotation 0.0... Those things should be inherited from existing blocks in reference DWG that is used for doing this task. ATTSYNC is though very good thing... Also we don't know exact orientation of blocks (WCS, UCS 3d space)... 5 hours ago, marko_ribar said: I am not sure, but maybe you are right with inserting 1.0 1.0 1.0 0.0... I suppose it will redefine and automatically inherit orienations... At the end insertion should be removed though IMHO... Please note that the inserted reference is purely used to redefine the definition (hence the position, rotation, scale & orientation are redundant) and the reference is subsequently deleted from the drawing. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 20, 2020 Share Posted November 20, 2020 If I understand correct the blocks are in seperate dwgs 1 block 1 dwg, so would not just insert the file at 0,0 it should ask do you want to redefine answer Y if I remember right explode and delete the block objects, obviously need a check does file exist. Quote Link to comment Share on other sites More sharing options...
diepvx Posted November 23, 2020 Author Share Posted November 23, 2020 Quote You might want to consider the program I posted here: https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-blocks-amp-attributes-lisp/m-p/4423983#M315011 That's wonderful bro! Work like a magic! Thank you genius. But I have a minor issue that some hatch don't change to catch up <dimension changing> in <reference attribute blocks>. I beditted that type of block, do nothing and then save it, the issue got fixed. And that's not caused by no regenerating the dwg Quote Link to comment Share on other sites More sharing options...
rlx Posted November 23, 2020 Share Posted November 23, 2020 maybe a quick fix with this : Quote Link to comment Share on other sites More sharing options...
diepvx Posted February 26, 2021 Author Share Posted February 26, 2021 Sorry but I got an issue about attributing block. I have used LEE's "REDEFALL" lisp above but the column block that having solid hatch become smaller as attached images. Please help me! Quote Link to comment Share on other sites More sharing options...
diepvx Posted March 2, 2021 Author Share Posted March 2, 2021 On 11/19/2020 at 10:56 PM, Lee Mac said: You might want to consider the program I posted here: https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/update-blocks-amp-attributes-lisp/m-p/4423983#M315011 Please help me sir 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.