Dear all
a humble request for change code in lisp file
want to edit dimension in command bar by multiple selection
find a code in forum but it select one dimension at a time
i want multiple selection and edit one by one continuously
if it possible kindly provide the code please
Thanks
Solved! Go to Solution.
Solved by paullimapa. Go to Solution.
Solved by paliwal222. Go to Solution.
Solved by paliwal222. Go to Solution.
problem already solved by Sir Kent1Cooper
(vl-load-com)
(defun c:dedit (/ seldim n dim cobj ns)
(prompt "\nTo override Dimension object(s) text content,")
(if (setq seldim (ssget ":L" '((0 . "DIMENSION"))))
(repeat (setq n (sslength seldim))
(setq
dim (ssname seldim (setq n (1- n)))
cobj (vlax-ename->vla-object dim)
); setq
(redraw dim 3); highlight
(setq ns (getstring "\nNew text content: "))
(vlax-put-property cobj 'TextOverride ns)
); repeat
); if
(princ)
)
give this a try:
; cc select & edit dimension string
; OP:
; https://forums.autodesk.com/t5/autocad-forum/requested-for-change-code-in-lisp/m-p/12304443#M1117115
(defun c:cc ( / seldim cobj ns)
(vl-load-com)
(princ"\nPick Dimension ")
(if (setq seldim (ssget '((0 . "DIMENSION"))))
(foreach b (mapcar 'cadr (ssnamex seldim)) ; create list of all entities from selection set & cycle through
(if (= 'ename (type b)) ; confirm is entity
(progn
(redraw b 3)
(setq cobj (vlax-ename->vla-object b))
(setq ns (getstring "\nNew Dimension ? : "))
(vlax-put-property cobj 'TextOverride ns)
(redraw b 4)
)
)
)
)
(princ)
)
Glad to have helped…cheers!!!
Can't find what you're looking for? Ask the community or share your knowledge.