Thank you all:)
Sometimes when I draw line along many points, I have to pan again and again, so I want to write this code that it automatic pan each time I draw a point.
To T.Willey
Thank you
CAB has ever write a code for me about a pline arrow, Yours two code is very similar.
(defun c:test ()
(vl-load-com) ; no error checking
(prompt "\nDraw your pline.")
(command "PLINE")
(while (> (getvar "CMDACTIVE") 0)
(command pause)
)
(setq ent (entlast))
(setq ArrowLength 5
ArrowWidth 2
)
(setq ArrowBasePt (vlax-curve-getPointAtDist ent ArrowLength))
(command "_pedit" ent "_e" "_i" "_non" ArrowBasePt "_x" "_e" "_w" "0"
ArrowWidth "_x" "" ""
)
(princ)
)
so I want to add just code inside it
(while (> (getvar "CMDACTIVE") 0)
(command pause)
(command "'pan" p1 p2)
)
but sure the code cant run.
To CAB
Thank you, the code run well. but nows code cant draw arc pline or set width because it use "foreach" to construct nor the normal pline command, can the transparent command be run in "pline" command?