AutoCAD Electrical Forum
Welcome to Autodeskā€™s AutoCAD Electrical Forums. Share your knowledge, ask questions, and explore popular AutoCAD Electrical topics.
cancel
Showing results forĀ 
ShowĀ Ā onlyĀ  | Search instead forĀ 
Did you mean:Ā 

Move specific attribute of certain block for all instances of that block project wide

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
sukhmeeth
253 Views, 5 Replies

Move specific attribute of certain block for all instances of that block project wide

Hi 

Can someone help in writing an auto-LISP code or maybe a built in option to be able to move a specific attribute of a certain block type of all instances of that block project wide. Basically there are many relay coils on multiple drawings and then need to change the DESC1 attribute of all of them to a longer name which means it might not fit the location they were located in previously (but because they are all in the same general location in each sheet, each of the DESC1 can be moved the exact same amount in every instance to make it work).

Labels (2)
5 REPLIES 5
Message 2 of 6
vladop
in reply to: sukhmeeth

Modify according to your needs.

Not project wide, only for the active drawing, because it seam that you can not use BEDIT in DBX.

 

Regards,

Vladimir

Message 3 of 6
vladop
in reply to: vladop

Be cautious, this LISP saves drawing changes.

Message 4 of 6
sukhmeeth
in reply to: vladop

Ok thanks will try this but need something that works for the whole project as there are so many drawings and going drawing by drawing will be too time consuming. 

Message 5 of 6
vladop
in reply to: sukhmeeth

You can use bat file.

On my computer it takes 15 seconds per drawing.

 

Create a new folder (e.g. "C:\SomePath\Folder1") and copy into it:
1. BlksModify-MoveAtt-SCR.lsp,
2. BlksModify.scr,
3. BlksModify.bat and

4. drawings you want to modify


In the first line of the "BlksModify.scr" change "C:\\SomePath\\Folder1" to your folder path.
USE DOUBLE SLASHES "\\" in the path!!!!!


Right click on "BlksModify.bat" and select EDIT.
Find and replace "C:\SomePath\Folder1" to your folder path.
USE SINGLE SLASH "\" in the paths!!!!!

 

Change C:\"Program Files"\Autodesk\"AutoCAD 2021"\acad.exe to your AUTOCAD exe path.

 

This part:
/p "<<VANILLA>>
means that plain AUTOCAD is opened (not ACAD Electrical).
I should be faster this way.

 

It does not modify drawings in "C:\SomePath\Folder1" but creates new copies in the in "C:\SomePath\Folder1\New" folder, which is safer.


Copy back new drawings to your project folder.

 

Regard,

Vladimir

Message 6 of 6
vladop
in reply to: sukhmeeth

I remembered now šŸ˜€

You can use AESWAPBLOCK command.

Modify block in library folder and than use "Option B -> Update a Block - substitute new version for selected block".

vladop_0-1661813047589.png

In the next dialog box there is a button "Project" for Project-wide.

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


AutoCAD Beta