Jump to content
diepvx

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

Recommended Posts

diepvx

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

Share this post


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

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites
BIGAL

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.

Share this post


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

Share this post


Link to post
Share on other sites
rlx

maybe a quick fix with this :

 

Share this post


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.   Paste as plain text instead

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