diepvx Posted November 19, 2020 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
Lee Mac Posted November 19, 2020 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
marko_ribar Posted November 19, 2020 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
marko_ribar Posted November 19, 2020 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
Lee Mac Posted November 19, 2020 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
BIGAL Posted November 20, 2020 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
diepvx Posted November 23, 2020 Author 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
diepvx Posted February 26, 2021 Author 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
diepvx Posted March 2, 2021 Author 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
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.