Can't get lisp to autoload

#1
I am unable to get my .lsp file to autoload at startup. I get the following command line error message at start up.

Could not load file or assembly 'file:///C:\Windows\system32\Compare.dll' or one of its dependencies. The system cannot find the file specified.
Can't open "C:\Program Files\CMS\CMS IntelliCAD 11.0 Premium Edition\icad.lsp" for input
error: LOAD failed

Anyone know what I am doing wrong?

Thanks,
Sean

Re: Can't get lisp to autoload

#3
Here is the lisp I am trying to automatically load on start up. Hope you can help me figure this out. I just switch from an old version of autocad and I'm trying to find my way around Intellicad.
Sean

;;;CADALYST 12/04 Tip1997: DimAutoLayer.LSP Dimension Layer Macros (c) 2004 Jack Foster

;Courtesy to CADalyst Magazine by Jack Foster http://www.3ddesignservices.com
;Honorable mention to AUGI.COM for teaching me about the CmdActive in AutoLisp
;Turning a layer "On, Unlock and Thaw" before making the layer guarantees that it will be the active layer and useable.
;Dimlinear
(defun c:DL (/ )
(setq cdln (getvar "clayer"))
(command "Layer" "on" "dim" "unlock" "dim" "thaw" "dim" "m" "dim" "c" "6" "dim" "")
(command "dimlinear")
(while (> (getvar "CmdActive") 0)(command pause))
(setvar "clayer" cdln)
)
;dimangular
(defun c:DG (/ )
(setq cdln (getvar "clayer"))
(command "Layer" "on" "dim" "unlock" "dim" "thaw" "dim" "m" "dim" "c" "6" "dim" "")
(command "dimangular")
(while (> (getvar "CmdActive") 0)(command pause))
(setvar "clayer" cdln)
)
;dimaligned
(defun c:DA (/ )
(setq cdln (getvar "clayer"))
(command "Layer" "on" "dim" "unlock" "dim" "thaw" "dim" "m" "dim" "c" "6" "dim" "")
(command "dimaligned")
(while (> (getvar "CmdActive") 0)(command pause))
(setvar "clayer" cdln)
)
;dimradius
(defun c:DR (/ )
(setq cdln (getvar "clayer"))
(command "Layer" "on" "dim" "unlock" "dim" "thaw" "dim" "m" "dim" "c" "6" "dim" "")
(command "dimradius")
(while (> (getvar "CmdActive") 0)(command pause))
(setvar "clayer" cdln)
)
;dimdiameter
(defun c:DD (/ )
(setq cdln (getvar "clayer"))
(command "Layer" "on" "dim" "unlock" "dim" "thaw" "dim" "m" "dim" "c" "6" "dim" "")
(command "dimdiameter")
(while (> (getvar "CmdActive") 0)(command pause))
(setvar "clayer" cdln)
)
;dimcontinue
(defun c:DC (/ )
(setq cdln (getvar "clayer"))
(command "Layer" "on" "dim" "unlock" "dim" "thaw" "dim" "m" "dim" "c" "6" "dim" "")
(command "dimcontinue")
(while (> (getvar "CmdActive") 0)(command pause))
(setvar "clayer" cdln)
)
;dimbaseline
(defun c:DB (/ )
(setq cdln (getvar "clayer"))
(command "Layer" "on" "dim" "unlock" "dim" "thaw" "dim" "m" "dim" "c" "6" "dim" "")
(command "dimbaseline")
(while (> (getvar "CmdActive") 0)(command pause))
(setvar "clayer" cdln)
)

Re: Can't get lisp to autoload

#4
Hi Sean,
I tryed your LISP script and there are a lot of error from AutoCAD Lisp file: In IntelliCAD the Lisp is not entirely scripted and some functions don't exist like
dimbaseline
Don't use this Lisp file if you don't know how to change the code yourself.

About Autoload in IntelliCAD, your problem is not the lisp script file but the IntelliCAD's installation because your message is about the "C:\Windows\system32\Compare.dll" !
A dll is a Dynamic link library loaded by Windows OS.
The icad.lsp file need this file to compare files.

For me on IntelliCAD v10.1, my file is Icad.lsp and not icad.lsp
Have you correctly written the autoload file, please? Look here and try this please:
viewtopic.php?p=6823&hilit=autoload&sid ... 065c#p6823

Re: Can't get lisp to autoload

#5
SPirou4D,
Thanks for trying to help. I haven't yet gotten my autolisp to autoload in each open drawing. But I did get it to autoload on the first open drawing and I created a button to load it in subsequent drawings with is fine with me. But I did want to mention the lisp does run fine on my system without any errors. Dimbaseline is a native command in Intellicad. So, I am not sure what errors you got but I just wanted to clarify that the lisp does work correctly to put dimension on a single layer. Thank you again for your help.

Sean