how can change the ltscale of just one line entity rather than a global value? thanks Russ
(I assume he was wanting to do it via Lisp or some such route, i.e. it was a customization, rather than a drafting, question. So the DXF or assoc-list route posted earlier should be helpful.) Kent Cooper, AIA ...
Well....assumptions can lead to problems sometimes. His question definitely did not address a lsp routine - it appeared he was a "newbie" trying to learn.
Walt - I would have thought it was obvious that I wanted the answer expressed in lisp. as Kent said "why would I post the question in the customization group"? ;-)
Try this code and see if it works: Substitute or assign a value to kiwiscale. (setq e (car (entsel)) ed (entget e) ) (if (not (assoc 48 ed)) (entmod (append ed (cons 48 kiwiscale))) (entmod (subst (cons 48 kiwiscale) (assoc 48 ed) ed)) ) (entupd e) Noah
Hi Noah and thanks! I've been looking through several books on how to do it. However I can't make your code work. It seems it doesn't like kiwiscale... "bad list" .....don't know why? also can I subsituite (setq e (car (entsel)) for (setq e (entlast)) ? cheers Russ
Russ, As I recall, you are in the process of switching to vlisp ActiveX. Why go back to messing with DXF codes and entmod? (setq vobj (vlax-ename->vla-object (car (entsel "\nSelect object: ")))) (vlax-put vobj 'LinetypeScale 0.25) The LinetypeScale property applies to all drawing objects. Joe Burke
Too late to know what your original post was, however my answer was a generalization of why fool around with a lsp routine when you can have your ltscale setup automatically with acad.lsp (although I didn't mention that directly).
Aloha Joe hey that works like magic. Yeah still trying to get my head around activeX even though there are less lines of code. I must study some more.... many thanks Russ
Russ, You're welcome. You might find a little thing like this useful while learning the ActiveX stuff. I still use it. (defun c:dump ( / ename ) (while (not (setq ename (car (entsel)))) (princ "\nSelect object: ") ) (vlax-dump-object (vlax-ename->vla-object ename)) ) ;end Displays at the text screen the properties available for the object picked. Assuming the property isn't read only (RO), (vlax-put vla-object '<property>) should work. G'day Joe Burke
Joe, You ought to change that code to dump the methods also: (vlax-dump-object (vlax-ename->vla-object ename) T) -- R. Robert Bell Russ, You're welcome. You might find a little thing like this useful while learning the ActiveX stuff. I still use it. (defun c:dump ( / ename ) (while (not (setq ename (car (entsel)))) (princ "\nSelect object: ") ) (vlax-dump-object (vlax-ename->vla-object ename)) ) ;end Displays at the text screen the properties available for the object picked. Assuming the property isn't read only (RO), (vlax-put vla-object '<property>) should work. G'day Joe Burke