Page 1 of 1

Can't get lisp to autoload

Posted: Sun Sep 18, 2022 11:25 am
by Smcvail
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

Posted: Mon Sep 19, 2022 2:39 am
by QuanNguyen
Hi Sean,

The autoload at startup works on my PC with IntelliCAD 11 PE+.
Does the lisp work when manual load?
Can you upload your lisp here?

Regards,
Quan Nguyen.

Re: Can't get lisp to autoload

Posted: Mon Sep 19, 2022 1:32 pm
by Smcvail
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

Posted: Tue Sep 20, 2022 3:45 am
by SPirou4D
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

Posted: Sat Sep 24, 2022 11:46 am
by Smcvail
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