×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Lisp question on LINE command

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?

RE: Lisp question on LINE command

I don't have 2008 but the "enter" after the 'newang' may be the problem-try deleting it so;

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


RE: Lisp question on LINE command

I think you have to preceed the newang with an "<"

RE: Lisp question on LINE command

(OP)
CarlB,
   I tried your suggestion, but still no luck. Thanks anyway.

RE: Lisp question on LINE command

(OP)
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.

RE: Lisp question on LINE command

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 "")

RE: Lisp question on LINE command

(OP)
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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources