View Full Version : execute autolisp automatically upon startup
alexo
2005-10-12, 05:06 PM
I have an autolisp routine that introduces Page Setup Names to the current drawing.
I am able to include it in the startup of AutoCAD 2004 (soon will be using 2006).
In addition to its automatic loading, I would like to execute it in the same fashion.
This way everytime that the user opens a drawing these Page Setup Names would be available.
Is this feasible? And how do I achieve it?
Thank you,
-alex
I have an autolisp routine that introduces Page Setup Names to the current drawing.
I am able to include it in the startup of AutoCAD 2004 (soon will be using 2006).
In addition to its automatic loading, I would like to execute it in the same fashion.
This way everytime that the user opens a drawing these Page Setup Names would be available.
Is this feasible? And how do I achieve it?
Thank you,
-alex
Are you currently running the routine at startup of each drawing? If you are then you would do the same thing you are already doing. If not, provide a little more information on your current procedures, and someone here will most likely help out.
alexo
2005-10-12, 06:14 PM
I'm sorry. Let's try again.
I have a routine that loads automatically because it has been included in the startup of Autocad 2004.
In order to run it (execute) the user is to type its name at the command line.
I would like for this routine to execute without the user's input.
I thinking that it may not be possible due to its function. This is why:
The routine imports Page Name Setups from a predetermined drawing. In order to import successfully, it needs to execute during Paperspace.
What do you think now?
Should I make a button to execute the lisp once the user switches to Tilemode 0?
I am not fluent in AutoLISP. I downloaded the one in question.
So unless I learn it, I depend on somebody else to do the rewriting.
Thank you for your responses,
-alex
Alex,
It is possible. You can make autocad run a lisp routine at startup.
If you are going to import page setups in each drawing, you then need to find out if those page setups are already in the drawing. Autorunning a routine that modifies the drawing will require you to either save or cancel when moving to a new drawing. Thus creating a lot of unnecessary dialog boxes showing up.
If you are starting from scratch, you could put those page setups in your template file.
alexo
2005-10-12, 07:09 PM
Thank you for your suggestion.
I have already included the setups in my template. I am trying to provide an automated way of bringing the setups to older drawings.
When you respond "It is possible", do you know how? Because I do not know how to make this routine run at startup.
-alex
Thank you for your suggestion.
I have already included the setups in my template. I am trying to provide an automated way of bringing the setups to older drawings.
When you respond "It is possible", do you know how? Because I do not know how to make this routine run at startup.
-alex
Alex,
Yes I do know how, but it has been explained quite well in this post. Please also note the remaining posts in that thread, and any links within.
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.