Author Topic: Startup Priority  (Read 11592 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.