Author Topic: How can I load two Startups at the same time  (Read 3410 times)

0 Members and 1 Guest are viewing this topic.

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
How can I load two Startups at the same time
« on: October 23, 2008, 10:34:20 AM »
How can I load two startups at the same time.  Well not the same time but one after the other.  I want to load first the office start up file from the server then load the users start up?  Can this even be done?
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

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: How can I load two Startups at the same time
« Reply #1 on: October 23, 2008, 11:06:30 AM »
How can I load two startups at the same time.  Well not the same time but one after the other.  I want to load first the office start up file from the server then load the users start up?  Can this even be done?

What do you mean by "startup"?  A custom office and user LSP file?
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

Bob Wahr

  • Guest
Re: How can I load two Startups at the same time
« Reply #2 on: October 23, 2008, 11:14:57 AM »
Add something like this to your company lisp

Code: [Select]
(setq strname (getvar "LOGINNAME"))
(load (strcat "C:\\pathiness\\" strname "\\pathiness as needed\\" strname "-startup.lsp")

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: How can I load two Startups at the same time
« Reply #3 on: October 23, 2008, 11:15:30 AM »
How can I load two startups at the same time.  Well not the same time but one after the other.  I want to load first the office start up file from the server then load the users start up?  Can this even be done?

What do you mean by "startup"?  A custom office and user LSP file?
Yes.

Code: [Select]
[color=red];;;(setq S::STARTUP (append S::STARTUP MYSTARTUP)) [/color]
(setq S::STARTUP (append S::STARTUP CWS-STARTUP))
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: How can I load two Startups at the same time
« Reply #4 on: October 23, 2008, 11:22:19 AM »
Add something like this to your company lisp

Code: [Select]
(setq strname (getvar "LOGINNAME"))
(load (strcat "C:\\pathiness\\" strname "\\pathiness as needed\\" strname "-startup.lsp")
All installs are local to the user's machine.  So right now I have the something like the following in everyone's Acaddoc file.
Quote
;;; + CWS Startup settings

(if (findfile "z:\\autolisp\\startup.lsp")
 (load "z:\\autolisp\\startup.lsp")
)

I am not trying to be snotty by questioning your suggestion Bob but it seems to me that I am going in circles to load the 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

Bob Wahr

  • Guest
Re: How can I load two Startups at the same time
« Reply #5 on: October 23, 2008, 11:44:46 AM »
So it sounds like you've got one loading the other.  That's all I was getting at.

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: How can I load two Startups at the same time
« Reply #6 on: October 23, 2008, 12:10:41 PM »
So it sounds like you've got one loading the other.  That's all I was getting at.
No I don't but I should try that again. (in getting the kinks work out I move it outside the startup function)

The local startup calling office startup.  I will give it a try.
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

Bob Wahr

  • Guest
Re: How can I load two Startups at the same time
« Reply #7 on: October 23, 2008, 12:34:14 PM »
That's the way I do it.  I use the LOGINNAME stuff so I don't have to modify each install.  Also if someone has to change pooters, they still get their stuffs.

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: How can I load two Startups at the same time
« Reply #8 on: October 23, 2008, 01:36:16 PM »
That's the way I do it.  I use the LOGINNAME stuff so I don't have to modify each install.  Also if someone has to change pooters, they still get their stuffs.
I got it to work.  I was being numb by making it complicated by calling two startups.  I was using a defun-q for each.  :ugly: 
Thanks.
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

JohnK

  • Administrator
  • Seagull
  • Posts: 10669
Re: How can I load two Startups at the same time
« Reply #9 on: October 23, 2008, 01:54:53 PM »
No time to read now, i was just passing thru and noticed the subject line...Sorry if this isnt the answer.

what i use:

Code: [Select]
(defun load-file ( f / find-file x)
 ;; accepts a list of files to load and either
 ;; load them or report that they were not loaded.
 ;;
 ;; Allows us a method for loading of support procedures
 ;; utilizing the support file paths located in the AutoCAD options
 ;; instead of hard paths.
 ;;
 ;; Example:
 ;;  (load-file
 ;;   '("lisp1.lsp"                "lisp2.lsp"
 ;;     "lisp3.lsp"                "lisp4.lsp"
 ;;    )
 ;;  )
 ;;
 ;; Written by: John (Se7en) K
 ;;             Nov-27-2006
   (vl-load-com)
           (defun find-file (f)
             (if (findfile f)
               (progn
        (load f)
        (princ (strcat "\n;;\t\t " f " loaded")))
               (princ (strcat "\n;;----->\t  ERROR: " f " not found"))) )
   (mapcar 'find-file f)
   (princ)
)

gotta go. Later,
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: How can I load two Startups at the same time
« Reply #10 on: October 23, 2008, 02:29:37 PM »
Seven,
I got it to work but I will take a look at yours to improve mine, thanks.
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