Jump to content

Recommended Posts

Posted (edited)

As posted over at theSwamp, I thought I'd post it here for you guys also :)

 

CopyText.lsp

 

CopyText.gif

 

SwapText.gif

 

The program will allow a user to copy the text content from a source object to a selection of destination objects or swap the text content between two objects. The user may select from Text, MText, Attribute, or Multileader objects.

 

Upon choosing 'Settings' the user can alter whether source object formatting should be retained upon copying/swapping to/with objects which permit the use of such formatting.

 

Ideas/criticism/feedback are, as always, welcome :)

 

Enjoy!

 

Lee

CopySwapTextV1-6.lsp

Edited by Lee Mac
  • 4 years later...
Posted

I have completely rewritten this program to fix a number of bugs present in the previous version.

 

The new version may be downloaded from my site here, or from the first post of this thread.

 

Enjoy!

 

Lee

Posted

Lee

 

Nice work as always.

 

Curios , How were you able to apply Color to Attributes? Multi-line or otherwise.

 

pBe

Posted
Lee

 

Nice work as always.

 

Thanks pBe :)

 

Curios , How were you able to apply Color to Attributes? Multi-line or otherwise.

 

The red & cyan colours were obtained using MText formatting codes applied to Multiline Attributes - or were you referring to something else?

Posted

The red & cyan colours were obtained using MText formatting codes applied to Multiline Attributes - or were you referring to something else?

 

You are correct. Never did try to change the color of Multi-line Attributes manually, so i figured it cannot be done with lisp codes. But you sure showed me its doable :thumbsup: Cant say the same for regular attributes though

 

Thanks a mil LM :)

Posted

So no more double-clicking, ctrl+c, escape, double clicking, ctrl+v, escape? But that was SO much fun! Ha ha ha! Thanks Lee!

Posted

Nicely done.

Thank you Lee!

 

 

Henrique

Posted
So no more double-clicking, ctrl+c, escape, double clicking, ctrl+v, escape? But that was SO much fun! Ha ha ha! Thanks Lee!

 

You can count on me to spoil your fun ;) :lol:

 

Enjoy resullins :)

  • 1 year later...
Posted
doesn't work at autocad2015 lee :(

 

Why you dont post your error message ^^ ?

Posted

Mine is working fine in 2015, so it might be a system setting. Also, Lee do you think it would be easy to do a check if the source and destination object is a dimension, and if so, allow it to copy it. Maybe something like this (this is part of my copy dimension program)?

(if (setq ss (LM:ssget "\nSelect destination dimensions:"
                                  '(((0 . "DIMENSION")))
                        )
               )
             (progn
               (setq obj (vlax-ename->vla-object ent)
                     cnt 0
               )
               (repeat (sslength ss)
                 (setq obj2 (vlax-ename->vla-object (ssname ss cnt)))
                 (vla-put-TextOverride obj2 (vla-get-TextOverride obj))
                 (setq cnt (+ cnt 1))
               )
             )
           )
           (setq whilestop nil)
          )

Posted

Why would you override your dimensions? it already allows you to copy a source dimension.

Posted
Why would you override your dimensions? it already allows you to copy a source dimension.
I have to override dimensions all the time. Many of my dimension have TYP., MIN., ESMT., after them. It kind of stinks to have to edit the text every time which is why I made my own routine so that I only have to do it once.
Posted

Many thanks for the feedback!

 

I have now updated this program to Version 1.5 to incorporate compatibility with Dimensions & MLeader Block Attributes.

Posted

Thank you very,very much sir. you have saved our lot of time for our all users.

Posted

Lee, thank you so much for this update, it is super useful and saves a ton of time. Do you happen to know why when I run it and copy from one dimension to another, I get Error: bad argument type: stringp nil and then it exits the while loop? It still will copy from one dimension to another, but you can only do it once.

Posted
Thank you very,very much sir. you have saved our lot of time for our all users.

Lee, thank you so much for this update, it is super useful and saves a ton of time.

 

You're welcome - I'm delighted that you both find the program so useful!

 

Do you happen to know why when I run it and copy from one dimension to another, I get Error: bad argument type: stringp nil and then it exits the while loop? It still will copy from one dimension to another, but you can only do it once.

 

After some testing, I can't seem to reproduce this error - are you able to upload an example drawing for which the program fails and describe the steps necessary to reproduce the error?

Posted

Lee, attached you will find a drawing in which it errors out on. Thank you so much for your help on this!

ctx-sample.dwg

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...