
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello to all:
In AutoCAD 2016 (may have to also do it in ACAD 2012) I have to edit several hundred blocks so that the value of a specifc attribute inside of the block will change to the name of actual block itself. I am not knowledgeable in scripting yet, but here is a list of what I think needs to be done.
- Enter the block’s name at the command line (store that entry as variable ORIGINALBLOCKNAME)
- Enter the name of the Palette where that block needs to go (stored as PALETTENAME)
- Use the REN command to change ORIGINALBLOCKNAME to RRRR
- Find the ASSTAG attribute value inside of block RRRR
- Assign BLOCKORIGINALNAME value to ASSTAG attribute value
- Save the block definition
- Close the block editor
- Save the drawing file
- Copy the block named RRRR to the Tool Palette named in step 2
- Delete block named RRRR from the drawing
- Purge block named RRRR from the drawing
- Re-insert block named RRRR at a user-defined-by mouse-click-on-screen
- Delete RRRR from the Tool Palette named in step 2
- Save the drawing file
- Copy block named BLOCKORIGINALNAME to Tool Palette named in step 2
- Insert block named BLOCKORIGINALNAME at a user-defined-by mouse-click-on-screen
I believe I have all the steps proven out, but again, the simple idea is that I need to change an attribute's value to match the block's name and then stick that modified block on a tool palette.
I'll pay up to $100 (too much, not enough?) thru Paypal if someone can write me a script to sucessfully accomplish this and very briefly comment throughout the script so I can learn how it was done. Thanks in advance for any replies!
Solved! Go to Solution.