Author Topic: Startup Priority  (Read 11587 times)

0 Members and 1 Guest are viewing this topic.

ronjonp

  • Needs a day job
  • Posts: 7529
Startup Priority
« on: August 01, 2006, 09:53:42 AM »
OK....so I have nearly 200 lisp routines that I load via calling them from a custom mnl file. My question is, how can I load all these routines but not wipe out my users pgp settings? Right now all the routines load up last so any quick keys that are defined in the acad.pgp get overwritten with conflicting routines.

thanks,

Ron

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Startup Priority
« Reply #1 on: August 01, 2006, 10:57:34 AM »
Nothing? I thought you gurus would have this one knocked out in minutes :).......on side note....anyone one of you using autoload to load your routines see this:

Quote
; error: no function definition: AUTOLOAD

but they still all load fine.

Thanks,

Ron

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Startup Priority
« Reply #2 on: August 01, 2006, 11:02:56 AM »
Add the following to the end of the .mnl file:

(setvar "re-init" 16)

This will reintialize the Acad.pgp file. I haven't used the acad.pgp in so long that I'm not positive this will work, but I'm pretty sure it will.

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Startup Priority
« Reply #3 on: August 01, 2006, 11:04:29 AM »
Nothing? I thought you gurus would have this one knocked out in minutes :)
Heck, I just got here.....haven't even had a cup of coffee yet..... :roll:

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Startup Priority
« Reply #4 on: August 01, 2006, 11:05:22 AM »
I suspect that AUTOLOAD is not causing the error but the routine that it is attempting to load that is generating the error.

As for your overwrite problem, perhaps an example of what you are loading. The problem is not clear to me.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Startup Priority
« Reply #5 on: August 01, 2006, 11:29:34 AM »
I suspect that AUTOLOAD is not causing the error but the routine that it is attempting to load that is generating the error.

As for your overwrite problem, perhaps an example of what you are loading. The problem is not clear to me.
I think the ronjonp's problem is, say you have a lisp routine that you use, and to call it, you type "Li", and then in your pgp file, you have "Li" as "Line".  Now the "Li" call will call the lisp instead of the "Line" command.  Here wants the pgp file to have the control, not the lisp routine.

If not, then never mind.   :wink:
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Startup Priority
« Reply #6 on: August 01, 2006, 12:25:46 PM »
T Willey...you hit the nail on the head. I tried using the (setvar "re-init" 16) at the end of the mnl file but it still does not work. I also tried manually REINIT and it doesn't work? I made sure the pgp being found was the one I made changes to (findfile acad.pgp).

My acad.lsp that I load has a series of:

(AUTOLOAD "bb" '("bb"))
(AUTOLOAD "xx" '("xx"))
(AUTOLOAD "yy" '("yy"))

......and so on

Is this possibly an Autoload problem?

thanks,

Ron



Did you get your coffee Jeff :)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Startup Priority
« Reply #7 on: August 01, 2006, 12:43:59 PM »
Looks like what Jeff said should work.
Quote from: Acad Help
Type:  Integer
Saved in:  Not-saved
Initial value:  0


Reinitializes the digitizer, digitizer port, and acad.pgp file. The setting is stored as a bitcode using the sum of the following values:

1
 Digitizer input/output port reinitialization
 
4
 Digitizer reinitialization
 
16
 PGP file reinitialization (reload)
 

To specify more than one reinitialization, enter the sum of the bitcode values. For example, enter 5 to specify both digitizer port (1) and digitizer reinitialization (4).
Other than that I don't know what you could do.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Startup Priority
« Reply #8 on: August 01, 2006, 12:50:50 PM »
Yep, got my coffee, Ron! And also Yes, this very well may be an AUTOLOAD issue....here's what the help file says:
Quote
The following list describes the search order AutoCAD uses to validate a command name.

If the input is a null response (SPACEBAR or ENTER), AutoCAD uses the name of the last command issued. HELP is the default.
AutoCAD checks the command name against the list of built-in commands. If the command is in the list and is not preceded by a period (.), AutoCAD then checks the command against a list of undefined commands. If the command is undefined, the search continues. Otherwise, the command is run, unless another reason prevents it from doing so. Running it transparently or in Perspective mode might be impossible.
AutoCAD checks the command name against the names of commands defined by a device driver, and then by those defined by the display driver.
AutoCAD checks the command name against the external commands defined in the program parameters file (acad.pgp). If the command name corresponds to a defined external command, that command runs, and the search is complete.
AutoCAD checks the command name against the list of commands defined by AutoLISP or ObjectARX applications. At this point, an autoloaded command is loaded. (For information about autoloading commands, see Command Autoloader.)
AutoCAD checks the command name against the list of system variables. If the command name is in the list, AutoCAD executes theSETVAR command, using the input as the variable name.
If the command name corresponds to a command alias defined in the program parameters file, AutoCAD uses the expanded command name and continues the search, starting a new search against the list of built-in commands.
If all the preceding steps fail, the search terminates with a warning message about illegal command names.
Note the the PGP file is checked for EXTERNAL applications first, then for Autoload, then for Alias's........

CADaver

  • Guest
Re: Startup Priority
« Reply #9 on: August 01, 2006, 01:07:42 PM »
His MNL is a series of autoloads that don't load until called.  He would need to add the re-init to the end of each called routine, wouldn't he?

nivuahc

  • Guest
Re: Startup Priority
« Reply #10 on: August 01, 2006, 01:09:18 PM »
I think the only real solution to the problem at hand is good housekeeping.

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Startup Priority
« Reply #11 on: August 01, 2006, 01:13:37 PM »
I think the only real solution to the problem at hand is good housekeeping.
AGREED!

CADaver

  • Guest
Re: Startup Priority
« Reply #12 on: August 01, 2006, 01:18:38 PM »
I think the only real solution to the problem at hand is good housekeeping.
AGREED!
AGREED^2

We've come to depend on the way the current hiarchy functions to make sure things are loaded in an acceptable order.

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Startup Priority
« Reply #13 on: August 01, 2006, 01:29:18 PM »
His MNL is a series of autoloads that don't load until called.  He would need to add the re-init to the end of each called routine, wouldn't he?

I don't have all the autoload lines in the mnl...I have a line that looks for an external file with all the lisp definitions in it and loads it if found. I know I need to do some cleanup but what i don't understand here is why reinit doesn't recognize my command aliases when manually initialized after startup.

Ron

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Startup Priority
« Reply #14 on: August 01, 2006, 01:38:46 PM »
I have an idea, not sure if it will work, but maybe.  I need to know how to make a lisp routine from a lisp routine.  I'm trying to redefine the lisp routines, to the command that the alias belong to.  I have it all worked out so far, but can't seem to redefine within the lisp.

Question (incase it got lost in there):
How to make a lisp function from a lisp function, and have it be defined right then are there? and have it be callable from the command line.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Startup Priority
« Reply #15 on: August 01, 2006, 01:45:36 PM »
T Willey,

You lost me :-o.

What steps do you take to ensure that the PGP file takes priority over externally defined commands?

I feel like this should be alot easier than I'm making it out to be.

Thanks for all the input,

Ron

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Startup Priority
« Reply #16 on: August 01, 2006, 01:50:00 PM »
I didn't.  I opened the pgp file, made a list of all the command alias's and the commands.  Then I read all the lisp files that are loaded, and compaired them.  Now I'm trying to convert the ones that overlap, to the commands that are defined in the pgp file.

So I have a list of lists, that I need to make defuns out of.  One example (on my computer) would be
("ATE" . "DDATTE")
Trying to do something like
(defun c:ate () (command ".ddatte"))
But can't get it to work right yet.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Startup Priority
« Reply #17 on: August 01, 2006, 02:00:33 PM »
Ron, as I see it Tim may be on to the only way around this situation, without telling your users to use alias's that don't conflict with your lisp functions.

Tim, here's a quick example to write/load/run/remove a lisp from a lisp:
Code: [Select]
(defun c:comments (/ file1 file2 t1 t2 timer1-end
   timer1-start timer2-end timer2-start)
  (setq file1 (open "c:\\testlisp1.lsp" "w")
file2 (open "c:\\testlisp2.lsp" "w"))
  (write-line "(defun c:test2 (/ mytest2)" file2)
  (write-line "  (setq mytest2 \"mytest2\")" file2)
  (write-line "  (princ)" file2)
  (write-line ")" file2)
  (close file2)
  ;;
  (write-line "(defun c:test1 (/ mytest1)" file1)
  (write-line "  (setq mytest1 \"mytest1\")" file1)
  (repeat 100000
    (write-line ";;;;this is a standard comment" file1)
    )
  (write-line "  (princ)" file1)
  (write-line ")" file1)
  (close file1)
  (setq timer1-start (getvar "millisecs"))
  (load "c:\\testlisp1.lsp")
  (setq timer1-end (getvar "millisecs"))
  (setq timer2-start (getvar "millisecs"))
  (load "c:\\testlisp2.lsp")
  (setq timer2-end (getvar "millisecs"))
  (setq t1 (strcat (rtos (/ (- timer1-end timer1-start) 1000.0) 2 5) " seconds."))
  (setq t2 (strcat (rtos (/ (- timer2-end timer2-start) 1000.0) 2 5) " seconds."))
  (princ (strcat "\nTime to load Testlisp1: " t1))
  (princ (strcat "\nTime to load Testlisp2: " t2))
  (princ (strcat "\nTestlisp1 file size = "
(rtos (vl-file-size "c:\\testlisp1.lsp") 2 0) " bytes."))
  (princ (strcat "\nTestlisp2 file size = "
(rtos (vl-file-size "c:\\testlisp2.lsp") 2 0) " bytes."))
  (vl-file-delete "c:\\testlisp1.lsp")
  (vl-file-delete "c:\\testlisp2.lsp")
  (princ)
  )

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Startup Priority
« Reply #18 on: August 01, 2006, 02:07:12 PM »
Is there no other way, than to write it to a lisp file, then load it, then delete the file?  I was hoping to do it from the command line, kind of behind the scenes.

Thanks Jeff.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Startup Priority
« Reply #19 on: August 01, 2006, 02:09:57 PM »
Yeah......this will load it:
Code: [Select]
(eval (read "(defun c:test () (alert \"TEST\"))"))

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Startup Priority
« Reply #20 on: August 01, 2006, 02:17:14 PM »
Yeah......this will load it:
Code: [Select]
(eval (read "(defun c:test () (alert \"TEST\"))"))
I tried that, and it didn't work, now I try it, and it does.  I must have typed something wrong.  Thanks Jeff.

Ron,
Here is the code I did, let me know if it works for you.  Right now it prompts you with how to call the lisp funtion that won't work anymore.
Code: [Select]
(defun c:ResetPgp (/ pgpFile Opened TextLine ComamndList LispRoutine)

(if (setq pgpFile (findfile "acad.pgp"))
 (progn
  (setq Opened (open pgpFile "r"))
  (while (setq TextLine (read-line Opened))
   (if
    (and
     (/= (substr TextLine 1 1) ";")
     (vl-string-search "," TextLine)
     (vl-string-search "*" TextLine)
    )
    (setq CommandList
     (cons
      (cons
       (strcase (substr TextLine 1 (vl-string-search "," TextLine)))
       (strcat "." (substr TextLine (+ 2 (vl-string-search "*" TextLine))))
      )
      CommandList
     )
    )
   )
  )
  (close Opened)
  (foreach LispRoutine (vl-remove-if-not '(lambda (x) (= (strcase (substr x 1 2)) "C:")) (atoms-family 1))
   (if (setq tmpList (assoc (strcase (substr LispRoutine 3)) CommandList))
    (progn
     (eval (read (strcat "(defun c:" (car tmpList) " () (command \"." (cdr tmpList) "\") (princ) )")))
     (prompt (strcat "\n Lisp routine \"" (substr LispRoutine 3) "\" is repalced with acad.pgp command alias."))
    )
   )
  )
 )
)
(princ)
)
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Startup Priority
« Reply #21 on: August 01, 2006, 02:25:19 PM »
I'm with Bob on this one.

But is this what you wanted Tim?
Code: [Select]
(defun test (key)
  (cond
    ((= key "prg1")
     (defun c:newprg ()
       (c:prg1) ; call the routine
     )
    )
    ((= key "prg2")
     (defun c:newprg ()
       (c:prg2) ; call the routine
     )
    )
    ((= key "prg3")
     (defun c:newprg ()
       (c:prg3) ; call the routine
     )
    )
  )
  (c:newprg)
)


(defun c:prg1()
  (print "You are here, prg1")
  (princ)
  )
(defun c:prg2()
  (print "You are here, prg2")
  (princ)
  )
(defun c:prg3()
  (print "You are here, prg3")
  (princ)
  )

(test "prg3")
(test "prg2")
(test "prg1")
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Startup Priority
« Reply #22 on: August 01, 2006, 02:35:07 PM »
Not really Alan, Jeff showed me the right way.  Thanks though.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Startup Priority
« Reply #23 on: August 01, 2006, 02:41:36 PM »
What do they say? "Don't dive in if you cant see the bottom."  :oops:
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Startup Priority
« Reply #24 on: August 01, 2006, 02:44:06 PM »
What do they say? "Don't dive in if you cant see the bottom."  :oops:
You have helped me before, so no big deal.  :-)  You can post to help me out anytime.  :wink:
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

CADaver

  • Guest
Re: Startup Priority
« Reply #25 on: August 01, 2006, 02:50:28 PM »
I don't have all the autoload lines in the mnl...I have a line that looks for an external file with all the lisp definitions in it and loads it if found. I know I need to do some cleanup but what i don't understand here is why reinit doesn't recognize my command aliases when manually initialized after startup.

If you have code to this affect:
Code: [Select]
(AUTOLOAD "bb" '("bb"))
when you enter bb it will autoload the function regardless of the pgp setting, won't it?.

CADaver

  • Guest
Re: Startup Priority
« Reply #26 on: August 01, 2006, 02:55:51 PM »
Gotta go with Bob on this one.  It's a lot easier to avoid the conflicts outright than to program around them.

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: Startup Priority
« Reply #27 on: August 01, 2006, 02:56:58 PM »
One thing we do here when creatin new functions is to give them 3 letter call instead of 2 so they do not conflict with acad and if you are a keyboard junkie you know what your lisps are.

ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

GDF

  • Water Moccasin
  • Posts: 2081
Re: Startup Priority
« Reply #28 on: August 01, 2006, 02:58:06 PM »

Ron,
Here is the code I did, let me know if it works for you.  Right now it prompts you with how to call the lisp funtion that won't work anymore.
Code: [Select]

(defun c:ResetPgp (/ pgpFile Opened TextLine ComamndList LispRoutine)

(if (setq pgpFile (findfile "acad.pgp"))
 (progn
  (setq Opened (open pgpFile "r"))
  (while (setq TextLine (read-line Opened))
   (if
    (and
     (/= (substr TextLine 1 1) ";")
     (vl-string-search "," TextLine)
     (vl-string-search "*" TextLine)
    )
    (setq CommandList
     (cons
      (cons
       (strcase (substr TextLine 1 (vl-string-search "," TextLine)))
       (strcat "." (substr TextLine (+ 2 (vl-string-search "*" TextLine))))
      )
      CommandList
     )
    )
   )
  )
  (close Opened)
  (foreach LispRoutine (vl-remove-if-not '(lambda (x) (= (strcase (substr x 1 2)) "C:")) (atoms-family 1))
   (if (setq tmpList (assoc (strcase (substr LispRoutine 3)) CommandList))
    (progn
     (eval (read (strcat "(defun c:" (car tmpList) " () (command \"." (cdr tmpList) "\") (princ) )")))
     (prompt (strcat "\n Lisp routine \"" (substr LispRoutine 3) "\" is repalced with acad.pgp command alias."))
    )
   )
  )
 )
)
(princ)
)
[/quote]


Tim

Thanks for sharing this one, I see now that I have some cleanup to do.

Gary
« Last Edit: August 01, 2006, 02:59:14 PM by Gary Fowler »
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: Startup Priority
« Reply #29 on: August 01, 2006, 02:59:41 PM »
forgot to add that we usually use double first letter i.e. la for the Layer command lla for the label command

Clear as mud?
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright © 2016

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Startup Priority
« Reply #30 on: August 01, 2006, 03:03:00 PM »
Tim

Thanks for sharing this one, I see now that I have some cleanup to do.

Gary

No problem.  It looked like it would be fun to see how to solve the problem.  It worked on my computer.

I don't have all the autoload lines in the mnl...I have a line that looks for an external file with all the lisp definitions in it and loads it if found. I know I need to do some cleanup but what i don't understand here is why reinit doesn't recognize my command aliases when manually initialized after startup.

If you have code to this affect:
Code: [Select]
(AUTOLOAD "bb" '("bb"))
when you enter bb it will autoload the function regardless of the pgp setting, won't it?.
I have "AA" defined as a multi-select block edit program.  After I run the program I posted, it issues the area command, so it looks like it will work.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

CADaver

  • Guest
Re: Startup Priority
« Reply #31 on: August 01, 2006, 03:15:03 PM »
I don't have all the autoload lines in the mnl...I have a line that looks for an external file with all the lisp definitions in it and loads it if found. I know I need to do some cleanup but what i don't understand here is why reinit doesn't recognize my command aliases when manually initialized after startup.

If you have code to this affect:
Code: [Select]
(AUTOLOAD "bb" '("bb"))
when you enter bb it will autoload the function regardless of the pgp setting, won't it?.
I have "AA" defined as a multi-select block edit program.  After I run the program I posted, it issues the area command, so it looks like it will work.
I can sorta see where it would.  You've basically redefined the function from the PGP. 

But I think my evaluation of the AUTOLOAD vs PGP is the reason his original attempt was not working, right?

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Startup Priority
« Reply #32 on: August 01, 2006, 03:20:46 PM »
I don't have all the autoload lines in the mnl...I have a line that looks for an external file with all the lisp definitions in it and loads it if found. I know I need to do some cleanup but what i don't understand here is why reinit doesn't recognize my command aliases when manually initialized after startup.

If you have code to this affect:
Code: [Select]
(AUTOLOAD "bb" '("bb"))
when you enter bb it will autoload the function regardless of the pgp setting, won't it?.
I have "AA" defined as a multi-select block edit program.  After I run the program I posted, it issues the area command, so it looks like it will work.
I can sorta see where it would.  You've basically redefined the function from the PGP. 

But I think my evaluation of the AUTOLOAD vs PGP is the reason his original attempt was not working, right?
I think so, based on what Jeff quoted from the help files.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Startup Priority
« Reply #33 on: August 01, 2006, 03:31:25 PM »
Tim,

Thats a sweet little routine. Worked like a charm here :).

Thanks for your efforts,

Ron

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Startup Priority
« Reply #34 on: August 01, 2006, 03:35:23 PM »
Tim,

Thats a sweet little routine. Worked like a charm here :).

Thanks for your efforts,

Ron
You're welcome Ron.  It was fun to test the brain.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

CADaver

  • Guest
Re: Startup Priority
« Reply #35 on: August 01, 2006, 05:57:17 PM »
Thanks for your efforts,
Yeah, thanks Tim.  While I'll probably never use the routine, there are some nifty tricks there for future projects.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Startup Priority
« Reply #36 on: August 01, 2006, 06:04:29 PM »
Thanks for your efforts,
Yeah, thanks Tim.  While I'll probably never use the routine, there are some nifty tricks there for future projects.
One thing you can do, is comment out the line where it makes the defun, and just find out what command alias's you are overwritting.  Could be cool just to see.

You're welcome to all.  Have fun using it or learning something from it.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Startup Priority
« Reply #37 on: August 02, 2006, 03:26:48 PM »
Found an even better way to do this on the Adesk site.  The only problem is, it will always list all the values that match an alias.  But it will make the command calls look better.  But as Tony T. pointed out, it would have to ran per drawing opened.
Code: [Select]
(defun c:ResetPgp (/ pgpFile Opened TextLine ComamndList LispRoutine)

(if (setq pgpFile (findfile "acad.pgp"))
 (progn
  (setq Opened (open pgpFile "r"))
  (while (setq TextLine (read-line Opened))
   (if
    (and
     (/= (substr TextLine 1 1) ";")
     (vl-string-search "," TextLine)
     (vl-string-search "*" TextLine)
    )
    (setq CommandList
     (cons
      (cons
       (strcase (substr TextLine 1 (vl-string-search "," TextLine)))
       (strcat "." (substr TextLine (+ 2 (vl-string-search "*" TextLine))))
      )
      CommandList
     )
    )
   )
  )
  (close Opened)
  (foreach LispRoutine (vl-remove-if-not '(lambda (x) (= (strcase (substr x 1 2)) "C:")) (atoms-family 1))
   (if (setq tmpList (assoc (strcase (substr LispRoutine 3)) CommandList))
    (progn
     (vl-acad-undefun (eval LispRoutine)) ;; The one new thing added
     (prompt (strcat "\n Lisp routine \"" (substr LispRoutine 3) "\" is repalced with acad.pgp command alias."))
    )
   )
  )
 )
)
(princ)
)
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Startup Priority
« Reply #38 on: August 02, 2006, 03:39:05 PM »
$.02

............  my advice would be to defun it as "LabelMakerThingymabobber" and let people shortcut it as they will.  If it's on a menu, it makes no difference at all if it has a short name or not, for people who want to run it commandline, they can do so.

ditto ^^ .. this  has worked well for be. I use a shortcuts.LSP file for the alias definitions, which loads last on the startup sequence     


   
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.