TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Luke on February 26, 2008, 09:02:52 AM
-
I have a lisp file that is in my startup suite. It load all my support lisps and now I think I want to make it load some support drawings. Having trouble with that.
(command "insert" "LCC_Annotation.dwg") :|
-
Short on time, but you should not use COMMAND in the start up.
Else look at this:
(setq sysattdia (getvar "ATTDIA"))
(setq sysattreq (getvar "ATTREQ"))
(setq systxteva (getvar "TEXTEVAL"))
(setvar "ATTDIA" 0)
(setvar "ATTREQ" 0)
(setvar "TEXTEVAL" 0)
(command "-insert" bname "0,0,0" "1.0" "" "0.0" )
(setvar "ATTDIA" sysattdia)
(setvar "ATTREQ" sysattreq)
(setvar "TEXTEVAL" systxteva)
-
As CAB says, the (command) function will generally not work in a startup lisp.
It needs to be defined in the S::STARTUP function.
Details on all of this are in the Customization Guide (http://www.kxcad.net/autodesk/autocad/AutoCAD_2008_Customization_Guide/WS73099cc142f4875513fb5cd10c4aa30d6b-7f62.htm)
-
why not insert that dwg into the appropriate DWT?
-
I can and will be putting it in my template.
However, I want it to be availabe for use in old drawings. My template is brand new and only use when starting a new drawing. But if going into an existing drawing I want this LCC_Annotation.dwg to load into the old drawings.