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.
While solving issue I found in Drawing unit setting under lighting options , "American" is select please referee below image.
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.
Solved! Go to Solution.
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
Much better answer, so I accepted it. And I hope you get my point...
Can't find what you're looking for? Ask the community or share your knowledge.