Jim Clayton Posted November 4, 2019 Posted November 4, 2019 Hello. I have the attached Lisp. I got it somewhere at some point in time...not sure when. I have my drawing units set to inches. When I run the Lisp it's reading the millimeters that are listed and drawing them in inches; example: Lisp reads 254 mm, it will draw 254 inches. I don't want to change the drawing units in cad because everything else non-lisp related is still in inches. So how can I modify the Lisp to write in inches as well? Let me know if there are any questions because I realize I made that a little confusing. Thanks for the help. Pipe V3.0.lsp Quote
Roy_043 Posted November 4, 2019 Posted November 4, 2019 Judging by the avatar in the dialog the code is by ymg. The code uses the LUNITS variable to determine the scale factor: (if (= (getvar "LUNITS") 2) (setq fac 25.4) (setq fac 1.0)) Changing this line (923) to: (setq fac 1.0) Should fix your issue. Quote
Jim Clayton Posted November 4, 2019 Author Posted November 4, 2019 That's the line I was looking for. Thank You. Tried tracking it down earlier but wasn't able to. I appreciate the help. Thanks again. Quote
pkenewell Posted November 4, 2019 Posted November 4, 2019 Change the following line: (if (= (getvar "LUNITS") 2) (setq fac 25.4) (setq fac 1.0)) to (setq fac 1.0) or (if using MEASUREMENT system variable to define metric units): (if (= (getvar "MEASUREMENT") 1) (setq fac 25.4) (setq fac 1.0)) 1 Quote
tanbqtb03 Posted November 7, 2019 Posted November 7, 2019 13 hours ago, Jim Clayton said: Thanks for the help. Please insert more fitting, such as: Elbow 45 short, Elbow 45 long, Y strainer...in your program Thanks a lot Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.