Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lisp question on LINE command 1

Status
Not open for further replies.

CADMILES

Mechanical
Joined
May 23, 2006
Messages
23
Location
US
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?
 
I don't have 2008 but the "enter" after the 'newang' may be the problem-try deleting it so;

(command ".LINE" p1 newang pause "")


 
I think you have to preceed the newang with an "<"
 
CarlB,
I tried your suggestion, but still no luck. Thanks anyway.
 
IFRs,
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.
 
I find the "angle override" present in 2005 so I could play with it. I find also that "command" has problems with the override, but the following seems to work OK:

(vl-cmdf ".LINE" p1 newang pause "")
 
CarlB,
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top