AutoCAD Electrical Forum
Welcome to Autodesk’s AutoCAD Electrical Forums. Share your knowledge, ask questions, and explore popular AutoCAD Electrical topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to turn off lighting option in Drawing UNIT dialog box.

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
Anonymous
1154 Views, 5 Replies

How to turn off lighting option in Drawing UNIT dialog box.

I am working on AutoCAD electrical 2019 Automation project, recently While running code on (Inserting Block in AutoCAD)  Drawing. below dialog box appears. need to close it manually.

 

MicrosoftTeams-image.png

 

While solving issue I found in Drawing unit setting under lighting options , "American" is select please referee below image.

Capture.PNG 

 

This above pop up appears only if the lighting option is selected. else if it blank then dialog box not appears.

 

if I click on this option then, there is only two choice, "American" and "International".

There is no blank choice.

 

Can Any one help me two solve this issue,or how to set lighting option blank. 

 

Labels (3)
5 REPLIES 5
Message 2 of 6
JeffatPrimex
in reply to: Anonymous

lightingunits = 0

 

Best regards,

Jeff

Message 3 of 6
Anonymous
in reply to: JeffatPrimex

No.

lightingunits cant be set to 0 since acad 2017...

Message 4 of 6
rhesusminus
in reply to: Anonymous

Thank you for sharing not the solution yourself.

Trond Hasse Lie
AutoCAD Electrical and EPLAN expert
Ctrl Alt El
Please select "Accept Solution" if this post answers your question. 'Likes' won't hurt either. 😉
Message 5 of 6
Anonymous
in reply to: rhesusminus

Hello Grouchy

No solution apart from a macro.

 

This is a quick sample:

 

(defun insert_my_noscaleblock ( / oldinsunits oldINSUNITSDEFSOURCE oldINSUNITSDEFTARGET myblo )
(setq oldinsunits (getvar "insunits")
oldINSUNITSDEFSOURCE (getvar "INSUNITSDEFSOURCE")
oldINSUNITSDEFTARGET (getvar "INSUNITSDEFTARGET")
)
(if oldinsunits (setvar "insunits" 0))
(if oldINSUNITSDEFSOURCE (setvar "INSUNITSDEFSOURCE" 4))
(if oldINSUNITSDEFTARGET (setvar "INSUNITSDEFTARGET" 4))
(setq myblo (getfiled "" "" "dwg" 2))
(command "_insert" myblo)
(if oldinsunits (setvar "insunits" oldinsunits))
(if oldINSUNITSDEFSOURCE (setvar "INSUNITSDEFSOURCE" oldINSUNITSDEFSOURCE))
(if oldINSUNITSDEFTARGET (setvar "INSUNITSDEFTARGET" oldINSUNITSDEFTARGET))
)

 

Et voila

 

Message 6 of 6
rhesusminus
in reply to: Anonymous

tenor.gif

Much better answer, so I accepted it. And I hope you get my point...


Trond Hasse Lie
AutoCAD Electrical and EPLAN expert
Ctrl Alt El
Please select "Accept Solution" if this post answers your question. 'Likes' won't hurt either. 😉

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


AutoCAD Beta