Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

need script written for editing attribute in several hundred blocks $WILL PAY$

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Anonymous
447 Views, 4 Replies

need script written for editing attribute in several hundred blocks $WILL PAY$

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!

4 REPLIES 4
Message 2 of 5
dbroad
in reply to: Anonymous

I am impressed that you are offering to pay for something.  That said, you should probably state your requirements as functional changes to block defintions and block references rather than a specific process for accomplishing the tasks.  Editing block definitions and updating block references programmatically does not involve palettes, or the block editor.  

Architect, Registered NC, VA, SC, & GA.
Message 3 of 5
Anonymous
in reply to: dbroad

Yes I've learned that money talks and BS walks 🙂

 

I layed out the steps that actually closely reflect what I have to manually do at the moment.  How that is approached in an automated fashion is beyond my knowledge at the moment.

 

To sum it up succinctly, I have nearly 3000 blocks with literally the same named attribute to edit and get onto tool palettes.  Gotta be a way to automate that somehow!  

 

 

 

Message 4 of 5
dbroad
in reply to: Anonymous

Regardless of payment, putting 3000 blocks on tool palettes is impractical.  As far as I know, AutoLISP cannot even interface with the tool palette system so you would need to contact someone with .NET experience.  Once a source block is purged from a source file, the tool palette tool referring to that block willl be broken.  If you just want to update block definitions and block references in 3000 drawings, no tool palettes, block editors, or purging is required.

Architect, Registered NC, VA, SC, & GA.
Message 5 of 5
Anonymous
in reply to: dbroad

Okay, thanks for the info!

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

Post to forums  

Forma Design Contest


AutoCAD Beta