Lisp question on LINE command
Lisp question on LINE command
(OP)
Does anyone know what the correct argument string should be to use the LINE command in a lisp program? I am using ACAD 2008. I am trying to use the angle override option after providing a first point, then I want to allow the user to select a screen point for the length. The code that I think should work, but doesn't:
(setq p1 (list 0 0 0))
(setq newang "<30.0")
(command ".LINE" p1 newang "" pause "")
Autocad seems to recognize the angle override, but then errors out. Any ideas?
(setq p1 (list 0 0 0))
(setq newang "<30.0")
(command ".LINE" p1 newang "" pause "")
Autocad seems to recognize the angle override, but then errors out. Any ideas?





RE: Lisp question on LINE command
(command ".LINE" p1 newang pause "")
RE: Lisp question on LINE command
RE: Lisp question on LINE command
I tried your suggestion, but still no luck. Thanks anyway.
RE: Lisp question on LINE command
The newang var is defined as a string that contains "<" as the leading character. I have tried "<" followed by the angle, but that doesn't work either. I will try all suggestions. Thanks.
RE: Lisp question on LINE command
(vl-cmdf ".LINE" p1 newang pause "")
RE: Lisp question on LINE command
Yes, that fixes it. Looks like I need to read up on Visual Lisp. All my old code is pre-Visual and may need updating with changes like this one. You've saved me considerable searching. Thanks very much. I owe you one.