The Hurricane Forum
The Hurricane Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 AutoCAD
 Lisp & Other Handy Files
 Copy attribute text in block to another attribute

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Attach a File

Check here to subscribe to this topic.
   

T O P I C    R E V I E W
jjb299 Posted - June 25 2014 : 2:20:14 PM
Has anyone come up with a LISP to copy attribute text in a block to another attribute in the same block? What I'm looking for goes something like this:
1. Block name?
2. FROM attribute tag? (text to be copied)
3. TO attribute tag? (insert copied text)
Maybe it could be called COPYCAT.lsp? (get it? copy ATT?)

That's all. Any code geniuses (geniui? lol) out there who can conquer this? Thanks guys. Love the program by the way.
-Justin
7   L A T E S T    R E P L I E S    (Newest First)
Admin Posted - June 27 2014 : 11:32:44 AM
Good stuff!!

Glad it got sorted out!
jjb299 Posted - June 27 2014 : 11:23:34 AM
oops. forgot to give credit to the amazing people who helped.
Thanks to "mid-awe" over at ACAD forums, Lee Mac at lee-mac.com, and admin at hurricane.
jjb299 Posted - June 27 2014 : 11:16:03 AM
Got it!
Attached are 2 files. COPYCAT will search for the first block it comes to that matches and copy one attribute to another. COPYCAT2 will find all blocks that match the name and copy the attribute to another. The first one is useful for something like a titleblock that should only be in a drawing once. The second one is useful for blocks that span across model and layouts.


Download Attachment: COPYCAT.txt
1.66 KB

Download Attachment: COPYCAT2.txt
1.68 KB
jjb299 Posted - June 26 2014 : 4:19:23 PM
Thanks admin. I found the tbwiz file very useful. I've managed to get a file together that should be working, but isn't. I've attached a copy of my code in TXT form. Where am I going wrong? Thanks.

Download Attachment: COPYCAT.txt
5.27 KB
Admin Posted - June 26 2014 : 08:49:56 AM
Take a look inside the Hurricane/Lisp folder. All the lisps in there that are "command line only" types. No screen clicks. So you can use portions of those to modify your lisp.

I'm thinking you could even get most of what you need from the TB_WIZ1.LSP in that directory.

Cheers!
jjb299 Posted - June 25 2014 : 5:13:27 PM
Thanks for the lead. That link doesn't do exactly what I want. However, with more Google Engineering, I found a LISP someone posted on a forum. I've attached it to this post. This LISP works great, but it relies on screen clicks. I want to use this in a script, so I need command line prompts.
Like in my first post, I want the command line prompts to go:
1. Block name
2. FROM attribute tag
3. TO attribute tag

I'm working on trying to reverse engineer this to make that work for command lines. Let me know if someone beats me to it.

Download Attachment: CopyAttributes.txt
2.7 KB
Admin Posted - June 25 2014 : 2:34:38 PM
Maybe this... http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/Copy-attribute-from-one-tag-to-another-tag-within-same-block/td-p/4550807 might help?

I haven't read all the way through it, but seems to be a good starting point with lots of lisp examples...

Please advise!

The Hurricane Forum © 2009 - 2021 Go To Top Of Page
This page was generated in 0.14 seconds. Snitz Forums 2000