Jump to content

Redefine Every single blocks contained in a drawing from block library folder path


Recommended Posts

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

Link to post
Share on other sites
marko_ribar

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 by marko_ribar
Link to post
Share on other sites
marko_ribar

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...

Link to post
Share on other sites
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.

Link to post
Share on other sites

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.

Link to post
Share on other sites
Quote

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

Link to post
Share on other sites
  • 3 months later...

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!

 

image.thumb.png.657fa07c6759afe1c5079a1fa6fa03c1.png

image.thumb.png.368b8c9d049c85f30a3768b51f4dccfb.pngimage.thumb.png.b59ffdf53d5110ebd3f739000c4f7325.png

Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...