auto loading lisp

Moderator: Carlson Support

Postby gskelhorn » Thu Oct 28, 2010 6:18 pm

BFT, can you post your ICAD.LSP file?
Perhaps you are using names Carlson is also using?
gskelhorn
 
Posts: 197
Joined: Tue Nov 03, 2009 12:56 am

Postby bftsurveying » Thu Oct 28, 2010 7:57 pm

I think you are on the right track. Originally, I thought I could get the individual lisp files to load using quick keys. So I entered all these in there. When that didn't work, I went back to trying to get the icad.lsp file to load. I did a lot of cleaning up of my icad.lsp file trying to prevent overlaps a while back.

After your comments, I removed the entries from quick keys and fixed some other conflicts with mine and quick keys I had overlooked. But I still do not get it loading automatically. I did make progress - I was getting a "stack overflow: error#" when I tried to run one of my lisp routines. Now, when I open a drawing, I have to load the icad.lsp (load "icad") or I will get a "null function: error" when I try to run one of my routines.

Here is my icad.lsp file:

;**********************************************************
; ICAD.LSP
;
;**********************************************************

(LOAD "8X11") ; 8.5x11 DRAWING SETUP FOR DOCK PERMIT
(load "AC") ; area converted to acreage
(LOAD "APLAT") ; 8.5x14 DRAWING SETUP
(LOAD "BA") ; REVERSES BEARING
(load "bd") ; adds bearing and distance to line
(load "BPLAT") ; 12x18 DRAWING SETUP
(load "cord2fil")
(LOAD "CPLAT") ; 18x24 DRAWING SETUP
(load "dplat") ; 24x36 DRAWING SETUP
(load "ds") ; adds distance to line (0.00)
(load "ds1") ; adds distance to line (0.0)
(load "ds2") ; adds distance to line (0.00')
(load "ds1a") ; adds dist to scaled section (0.0)
(load "dt")
(load "QL") ; quick list
(load "TA") ; text append
(load "TL") ; text align to line
(load "TR") ; text replace
(load "TS") ; "textsize"
(load "TZ") ; text size change
(load "LAYERS") ; YC =layer set to name or object
; YE =layer erase
; YG =layer changed for object(s) picked
; YH =layer hide(off) by picking object


I realize some of this is redundant but it is what I am use to. I have also re-checked for conflict with aliases. I think there are some other commands that are used by carlson that may be conflicting. When I type ts, for example, it starts a text size scaler command. TS is not in my quick keys or aliases. Where else is this coming from?
Thanks
bftsurveying
 
Posts: 12
Joined: Tue Oct 26, 2010 5:22 pm
Location: Beaufort, SC

Postby gskelhorn » Thu Oct 28, 2010 8:50 pm

Carlson has command names that are from routines loaded similar to what you are doing. These would not appear as an alias or quick key.

I suggest trying to add a distinct prefix to your routines and then setting up a quick key to run your routine. You will want to edit your lisp programs to be sure you are calling your functions and not getting a Carlson routine (if you have a modular structure). Also, your may be creating problems within Carlson routines if you have a lisp function with the same name as one of their.

I have found it definitely takes effort to add in my cutomization without clobbering/conflicting with Carlson routines.

Good luck!
gskelhorn
 
Posts: 197
Joined: Tue Nov 03, 2009 12:56 am

Postby bftsurveying » Fri Oct 29, 2010 1:32 pm

Thanks everyone - I have been able to sort out the conflicts between my icad.lsp file, quick keys, aliases and carlson hidden routines. It appears to load properly every time now with the exception of when I exit the startup wizard and try to start in drawing1. It is funny because if I go from there and open an existing drawing and come back to drawing1, everything works fine!? Oh well, that little qlitch should never be a real concern.
bftsurveying
 
Posts: 12
Joined: Tue Oct 26, 2010 5:22 pm
Location: Beaufort, SC

Postby emorse4487 » Mon Nov 01, 2010 2:49 pm

Add your "load" commands to the QUICKRUN.LSP file found here:

C:\Documents and Settings\username\Application Data\Carlson Software\Carlson2011\ICAD\USER\QUICKRUN.LSP

I copy all of my lsp commands into the default LSP file, but you don't have to.

Paste the following code into the QUICKRUN.LSP file:

(load "c:\\program files\\Carlson2011_ICAD\\lsp\\pstamp.lsp")

Works like a charm, and this method will get rid of your issues with not having the commands available when working in drawing1.dwg.

-Eric
Eric J. Morse, P.E.
MEC Industries, LLC
emorse4487
 
Posts: 85
Joined: Sun Nov 09, 2008 3:54 am
Location: Fiskdale, MA

Postby bftsurveying » Mon Nov 01, 2010 3:46 pm

Awesome, quickrun.lsp is what I was looking for.

Sorry, but you lost me on the pstamp.lsp. Is that on alternative to adding all the "load" commands to quickrun - you have another lisp file (pstamp.lsp) that you load that contains all your "load" commands.

Thanks
bftsurveying
 
Posts: 12
Joined: Tue Oct 26, 2010 5:22 pm
Location: Beaufort, SC

Postby emorse4487 » Mon Nov 01, 2010 8:14 pm

Sorry, pstamp is a lsp I wrote for a custom plot stamp. I copy that code and change the name for every lsp I want to load; the first few lines in your QUICKRUN.lsp file will look like so:

(load "c:\\program files\\Carlson2011_ICAD\\lsp\\lisp1.lsp")
(load "c:\\program files\\Carlson2011_ICAD\\lsp\\lisp2.lsp")
(load "c:\\program files\\Carlson2011_ICAD\\lsp\\lisp3.lsp")
(load "c:\\program files\\Carlson2011_ICAD\\lsp\\lisp4.lsp")

Where "lisp#" corresponds to the name of the lisp that I copy into the Carlson folder.

Making a single LSP that contains all of the programs you want to load and using quickrun to load that lsp (and subsequently the rest of your routines) is an interesting idea, but I can't say for sure that it would work.
Eric J. Morse, P.E.
MEC Industries, LLC
emorse4487
 
Posts: 85
Joined: Sun Nov 09, 2008 3:54 am
Location: Fiskdale, MA

Previous

Return to Survey

Who is online

Users browsing this forum: No registered users