×
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 code working only sometimes in autocad

lisp code working only sometimes in autocad

lisp code working only sometimes in autocad

(OP)
Here's my problem: I wrote a lisp routine that draws a grid  of blocks (rectangular array 50x50),a rectangular boundary, and the values of the X,Y coordinate on the rectangular boudary. At the time I wrote the code, it worked fine. After few hours... it begun drawing zero lenghten lines and positioning text at weird positions. I tested the code on 3 different machines... Sometimes it worked well, but more times with errors. All this in Autocad 2004. I've tested the code in intellicad and it works 100% all the times. I don't know where to find the problem and I'm asking for your help. Could it be a system variable in autocad?

Thank you.

RE: lisp code working only sometimes in autocad

I wrote a code one time that worked sometimes and did not work the next time I would need it. I found that if my osnap was off or I was zoomed in close it worked. What was taking place was the object snap was causing lines to start and end where they were not wonted. I wrote in the code to set the osmode to "0", and before the code exits to set the osmode back to what it was. That fixed it. Hope this is your fix and that this helps. Good Luck.

RE: lisp code working only sometimes in autocad

(OP)
Thanks verry much, the osmode was my problem, indeed.
I guess it happens often to all beginers in autolisp coding :).

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