Fix All Blocks

Fix All Blocks

Anonymous
Not applicable
2,908 Views
3 Replies
Message 1 of 4

Fix All Blocks

Anonymous
Not applicable

Hello everyone,


I have been putting together a script to automate some changes. It's an amalgamation of a few others I have found here in other parts of the forum. The script takes a re-saved copy of a drawing that is made up in a certain fashion and then re-formats it. I am currently stuck at the fix all blocks stage as I have found a fantastic script by Kent Cooper but cannot get it to loop through every block. I have attached the lisp files originally created by Kent for reference. 
If anyone can help that would be great but in the mean time I'll be trying different things. I currently cannot get the right object/variable type to be selected but I also think I'm looping wrong.  

 

0 Likes
Accepted solutions (1)
2,909 Views
3 Replies
Replies (3)
Message 2 of 4

dlanorh
Advisor
Advisor
Accepted solution

Try the attached.

 

It unlocks all locked layers and relocks them on exit to allow items on locked layers to be processed.

 

It processes all referenced blocks in the drawing, including anonymous dynamic block references as well as their dynamic block definitions, and changes attributed reference blocks (without using attsync) and their block definitions.

 

Blocks sub entities are set to layer "0", color byblock, linetype byblock and lineweight bylayer

I am not one of the robots you're looking for

0 Likes
Message 3 of 4

Anonymous
Not applicable

Thanks a bunch my dude, works perfectly c:

0 Likes
Message 4 of 4

CyberBIM
Observer
Observer

how do you run it?

 

0 Likes