Lee Mac Posted January 5, 2011 Posted January 5, 2011 (edited) As posted over at theSwamp, I thought I'd post it here for you guys also CopyText.lsp 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 March 21, 2016 by Lee Mac Quote
Lee Mac Posted February 23, 2015 Author Posted February 23, 2015 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 Quote
pBe Posted February 23, 2015 Posted February 23, 2015 Lee Nice work as always. Curios , How were you able to apply Color to Attributes? Multi-line or otherwise. pBe Quote
Lee Mac Posted February 23, 2015 Author Posted February 23, 2015 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? Quote
pBe Posted February 23, 2015 Posted February 23, 2015 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 Cant say the same for regular attributes though Thanks a mil LM Quote
resullins Posted February 23, 2015 Posted February 23, 2015 So no more double-clicking, ctrl+c, escape, double clicking, ctrl+v, escape? But that was SO much fun! Ha ha ha! Thanks Lee! Quote
Lee Mac Posted February 23, 2015 Author Posted February 23, 2015 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 Enjoy resullins Quote
Lee Mac Posted February 23, 2015 Author Posted February 23, 2015 Nicely done.Thank you Lee! Thanks Henrique! Quote
ketxu Posted March 18, 2016 Posted March 18, 2016 doesn't work at autocad2015 lee Why you dont post your error message ^^ ? Quote
broncos15 Posted March 18, 2016 Posted March 18, 2016 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) ) Quote
BrianTFC Posted March 18, 2016 Posted March 18, 2016 Why would you override your dimensions? it already allows you to copy a source dimension. Quote
broncos15 Posted March 18, 2016 Posted March 18, 2016 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. Quote
Lee Mac Posted March 20, 2016 Author Posted March 20, 2016 Many thanks for the feedback! I have now updated this program to Version 1.5 to incorporate compatibility with Dimensions & MLeader Block Attributes. Quote
yathishkumar Posted March 21, 2016 Posted March 21, 2016 Thank you very,very much sir. you have saved our lot of time for our all users. Quote
broncos15 Posted March 21, 2016 Posted March 21, 2016 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. Quote
Lee Mac Posted March 21, 2016 Author Posted March 21, 2016 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? Quote
broncos15 Posted March 21, 2016 Posted March 21, 2016 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 Quote
Recommended Posts
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.