So, I've tried doing a search but I don't even know what to search for so it's a bit mute.
I hope you guru's here can help me out once again.
This is what I have:
(defun c:TW (/ oldecho Sel FromObj ToObj)
(defun $error (msg /)
(if (or (= msg "Function cancelled") (/= msg "quit / exit abort"))
(princ (strcat "Error: " msg))
)
(command ".redraw")
(setvar "cmdecho" 1)
(setq *error* old_err)
(princ)
);end error
(setq old_err *error*
*error* $error
oldecho (getvar "cmdecho"))
(setvar "cmdecho" 0)
(and
(setq Sel (nentsel "\n Select text/attribute to match properties from: "))
(setq FromObj (vlax-ename->vla-object (car Sel)))
(setq Sel (nentsel "\n Select text/attribute to match properties to: "))
(setq ToObj (vlax-ename->vla-object (car Sel)))
(mapcar
'(lambda (x)
(vlax-put ToObj x (vlax-get FromObj x)))
'("ScaleFactor")
)
)
(setvar "cmdecho" 1)
(princ)
)
This code works superbly for transferring the "ScaleFactor" from one element to another.
I actually copied this and made another transferring the "TextString" from one element to another.
I am currently trying to modify the code a bit to access more of the entity being selected. One is the Text Style. Unfortunately, "TextStyle" does not work.
So, I've gotten this far in trying to read the elements of an entity like so:
Command: (setq Sel (nentsel))
Select object: (<Entity name: 7eb07d60> (658.932 134.802 0.0))
Command: !sel
(<Entity name: 7eb07d60> (658.932 134.802 0.0))
Command: (setq Obj (vlax-ename->vla-object (car Sel)))
#<VLA-OBJECT IAcadAttributeReference2 1163ff3c>
Command: !obj
#<VLA-OBJECT IAcadAttributeReference2 1163ff3c>
But, I don't know how to get all the info out of this variable: #<VLA-OBJECT IAcadAttributeReference2 1163ff3c>
So, in essence; I know I can change one line of code to get different effects out of the lisp routine (example: ScaleFactor, TextString)
What else is this capable of ?? Where can I find a list of the possible uses of this ?? How can I extract a list of all the possible properties out of the 'Obj' variable from above ??
I hope these questions make sense, but if not please be patient with me and ask a lot of questions.
Thank you all very much.