Author Topic: startup lisp?  (Read 5265 times)

0 Members and 1 Guest are viewing this topic.

Willie

  • Swamp Rat
  • Posts: 958
  • Going nowhere slowly
startup lisp?
« on: February 21, 2008, 09:50:24 AM »
Hi

What variables do you set with your startup lisp file? and do you load some applications with it as well?

Willie
Soli Deo Gloria | Qui Audet Adipiscitur
Windows 8  64-bit Enterprise | Civil 3D 2015 and 2016| ArcGIS 10.1
Yogi Berra : "I'd give my right arm to be ambidextrous."

Josh Nieman

  • Guest
Re: startup lisp?
« Reply #1 on: February 21, 2008, 09:54:06 AM »
I use very little in my startup lisp.

If I want LSP routines autoloaded, I put them in the startup suite of the appload manager.  I have about a dozen small things I wrote for expediting tasks or setting shortcut keys, and a couple routines I found, one being Al's Steel Mill.  If you're talking about the startup lisp that loads whenever you open a drawing, it would be a huge waste and very inefficient to put these types of things in that lsp.

The only thing I have set in my startup routine is the few things I -universally- want set a certain way... which adds up to:
Code: [Select]
(setvar "layernotify" 0)
(setvar "layereval" 0)
(setvar "fieldeval" 19)
(setvar "OBSCUREDLTYPE" 0)
(setvar "textsize" 0.09375)

Those were pretty much the only things that I wanted set that way without exception.

Willie

  • Swamp Rat
  • Posts: 958
  • Going nowhere slowly
Re: startup lisp?
« Reply #2 on: February 21, 2008, 10:08:43 AM »
Hi

My startup suite consists of:

Code: [Select]
  (setvar "MIRRTEXT"  0)
  (setvar "ATTREQ"    0)
  (setvar "ATTDIA"    1)
  (setvar "TEXTFILL"  1)
  (setvar "LAYEREVAL" 0)
  (setvar "LAYERNOTIFY" 0)

Applications I load with the icons
Code: [Select]
^C^C(load  "CHP__Set Layer Color") CHP
and there are a couple in the Startup Suite in the application manager

Thanks
Soli Deo Gloria | Qui Audet Adipiscitur
Windows 8  64-bit Enterprise | Civil 3D 2015 and 2016| ArcGIS 10.1
Yogi Berra : "I'd give my right arm to be ambidextrous."

Josh Nieman

  • Guest
Re: startup lisp?
« Reply #3 on: February 21, 2008, 10:15:04 AM »
Yea, sounds like you do it like I do.  I only have one VBA routine that I use, and it's loaded via a macro that I assign to a button or menu pulldown (to give my users the option) and it unloads itself when done.

I have times where MIRRTEXT gets set wrong for some reason... I may add that one to the startup lsp... thanks for the idear.

sinc

  • Guest
Re: startup lisp?
« Reply #4 on: February 21, 2008, 12:21:39 PM »
This is ours.  It does a Windows no-no, and logs files as they are opened to the C:/ drive instead of to the user's Documents and Settings directory, but so far the Windows Police haven't arrested me for it.

Code: [Select]
(load "mtextmask")
(load "ptinv")
(load "twipeouts")
(load "vps")

(defun c:pp ()
  (command "-purge" "r" "" "n")
  (princ)
)

(defun timedate (/ cdate ctime ampm stime)
  (setq cdate (rtos (fix (getvar 'cdate)) 2 0)
ctime (rtos (rem (getvar 'cdate) 1) 2 6)
ampm  (if (<= (atof (substr ctime 3 2)) 12)
"AM"
"PM"
      )
stime (strcat
(substr cdate 1 4)
"-"
(substr cdate 5 2)
"-"
(substr cdate 7 2)
" "
(substr ctime 3 2)
":"
(substr ctime 5 2)
":"
(substr ctime 7 2)
":"
ampm
      )
  )
)

(defun-q MYSTARTUP ()
(if (not (wcmatch (getvar 'DWGNAME) "Drawing1.dwg"))
   (progn
     (setq FILEDESC (open "C:/AutocadFiles.log" "a"))
     (write-line
       (strcat (timedate)
       " "
       (getvar 'DWGNAME)
       " "
       (getvar 'DWGPREFIX)
       ) ;_ strcat
       FILEDESC
     ) ;_ write-line
     (close FILEDESC)
     (setq FILEDESC nil)
   ) ;_ progn
) ;_ if
         (setvar "filedia" 1)
         (setvar "cmddia" 1)
         (setvar "layereval" 0)
         (load "recent")
) ;_ defun-q
(setq S::STARTUP (append S::STARTUP MYSTARTUP))

ronjonp

  • Needs a day job
  • Posts: 7527
Re: startup lisp?
« Reply #5 on: February 21, 2008, 12:28:03 PM »
I have something pretty similar Sinc :)

Code: [Select]
(defun rjp-datetime (/ cdate ctime stime)
  (setq cdate (rtos (fix (getvar 'cdate)) 2 0)
ctime (rtos (rem (getvar 'cdate) 1) 2 6)
stime (strcat
(substr cdate 5 2)
"-"
(substr cdate 7 2)
"-"
(substr cdate 1 4)
"-"
(substr ctime 3 2)
":"
(substr ctime 5 2)
      )
  )
)
(defun rjp-log2file (/ fname)
  (if (= (getvar 'dwgtitled) 1)
    (progn
      (setq fname
     (open (C:\\DWGS_Opened.log") "a")
      )
      (write-line
(strcat (getenv "username")
","
(rjp-datetime)
","
(getvar 'DWGPREFIX)
""
(getvar 'DWGNAME)
)
fname
      )
      (close fname)
    )
  )
  (princ)
)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

rkmcswain

  • Swamp Rat
  • Posts: 978
Re: startup lisp?
« Reply #6 on: February 21, 2008, 02:29:45 PM »
Hi
What variables do you set with your startup lisp file? and do you load some applications with it as well?

ACAD.LSP
Set the support file search path
Set ±15 other paths (plotters, tool palettes, etc.)
Set ±20 system variables (Nothing that modifies the drawing file itself, only registry saved or not-saved sysvars)
Load a few ARX files.
ACADDOC.LSP
"Autoload" several dozen lisp files.
Define ±50 shortcuts (like OC for offset current layer, and CB for copybase)
Define a few custom lisp routines that have not been broken out to a separate file for autoloading.
Set up Windows environment variables so that Raster Design can find the LM
Disable "communication center"
Disable "digital signature checking"

sinc

  • Guest
Re: startup lisp?
« Reply #7 on: February 21, 2008, 04:17:58 PM »
What do you do to disable communication center?  Does it keep it from ever launching at all?

If so, it might be a way to get rid of the comm center crash message that appears so often after C3D shuts down...

Josh Nieman

  • Guest
Re: startup lisp?
« Reply #8 on: February 21, 2008, 04:20:45 PM »
What do you do to disable communication center?  Does it keep it from ever launching at all?

If so, it might be a way to get rid of the comm center crash message that appears so often after C3D shuts down...

I get that sporadically when Autocad vanilla crashes during rendering. :/ 

*remembers to check back on this thread*

Atook

  • Swamp Rat
  • Posts: 1029
  • AKA Tim
Re: startup lisp?
« Reply #9 on: February 21, 2008, 05:48:23 PM »
What do you do to disable communication center?...

I just did this on a machine I setup recently. No phoning home here.. :)

No LISP, I did it by editing the registry..

ronjonp

  • Needs a day job
  • Posts: 7527
Re: startup lisp?
« Reply #10 on: February 21, 2008, 05:54:42 PM »
What do you do to disable communication center?...

I just did this on a machine I setup recently. No phoning home here.. :)

No LISP, I did it by editing the registry..

We think alike Atook :kewl:

http://www.theswamp.org/index.php?topic=19111.msg232503#msg232503

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

sinc

  • Guest
Re: startup lisp?
« Reply #11 on: February 21, 2008, 06:41:41 PM »
Great!  One more annoyance gone.   :-)

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: startup lisp?
« Reply #12 on: February 21, 2008, 08:54:15 PM »
What do you do to disable communication center?  Does it keep it from ever launching at all?

If so, it might be a way to get rid of the comm center crash message that appears so often after C3D shuts down...

I get that sporadically when Autocad vanilla crashes during rendering. :/ 

*remembers to check back on this thread*
Could this be the culprit that wont dump the phyiscal memory for ACA2008 or is just the nature of this pig with lipstick?
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: startup lisp?
« Reply #13 on: February 21, 2008, 09:11:45 PM »
This is ours.  It does a Windows no-no, and logs files as they are opened to the C:/ drive instead of to the user's Documents and Settings directory, but so far the Windows Police haven't arrested me for it.

Just for my own edification.  Why are you Guys logging your files? 
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

sinc

  • Guest
Re: startup lisp?
« Reply #14 on: February 22, 2008, 12:00:13 AM »
Because a lot of times I end up working on several projects through the day, and I don't maintain my time card, and at the end of the day I'm sitting there going "now what the ... did I work on today?"  If I call up that list and see what drawings I opened, I can typically remember what I did, and I don't forget to charge someone.

It's got some drawbacks.  The way I have it now, it doesn't log anything when we create a new drawing.  And it would be nice to see the length of time the drawing is open.  I've been meaning to extend the script (or maybe just add something to the Sincpac) to do this, but it hasn't been a high enough priority to get into the active task list.

daron

  • Guest
Re: startup lisp?
« Reply #15 on: February 25, 2008, 05:54:03 PM »
What do you do to disable communication center?  Does it keep it from ever launching at all?

If so, it might be a way to get rid of the comm center crash message that appears so often after C3D shuts down...

I get that sporadically when Autocad vanilla crashes during rendering. :/ 

*remembers to check back on this thread*
Could this be the culprit that wont dump the phyiscal memory for ACA2008 or is just the nature of this pig with lipstick?
Not sure of the PM dump, but it works for me with not having the comm center crash ACA every time it wants to communicate back to Mamma.