Author Topic: AutoStart Netload when debugging.  (Read 5824 times)

0 Members and 1 Guest are viewing this topic.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
AutoStart Netload when debugging.
« on: January 13, 2007, 07:34:07 PM »
I've been sucessfully using a startup script to Autoload (into AutoCAD) the net Assembly currently being edited/Debugged in VS2005.

In vs2005, from the Project Properties, make the following changes :-

. Add the Start Action -> external Program : < qualified path to Acad.exe >

. Add the Start Options -> Working directory : Essentially a 'start-in' folderPath. I use it for test drawings for all projects, data and the Startup script for each project   

. Add the Start Options -> Command Line Arguments : Similar to the Command line switches used in batch files and from Icons. [ refer Acad help ]. The last parameters will be :-  /b <project script file qualified path&Name >

. Build a script file in the Working directory with a unique name to be used with a specific project. [ see sample ]


When you start debugging from VS2005 ( using F5 or from the menu ) Autocad will start and the script file will execute, NETLOADing the nominated DLL.

As a result of the ScriptFile Name being saved in the Project properties, when you change projects and start debugging, the correct DLL will always be loaded

Feedback appreciated ..

The sample Script code :
Code: [Select]
;; LayoutsAndPlots.scr
netload
"k:/Visual Studio 2005 Projects/_cad/CsMgdAcad-LayoutsAndPlots/CsMgdAcad-Template1/BIN/DEBUG/CsMgdAcad-LayoutsAndPlots.dll"
;;;;

and some piccys :-   
« Last Edit: January 14, 2007, 04:52:31 PM by Kerry Brown »
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.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: AutoStart Netload when debugging.
« Reply #1 on: January 13, 2007, 07:42:07 PM »
additional note:
The text displayed (in this case) is defined as part of the current class Initialise() Method.

There is a sample here : http://www.theswamp.org/index.php?topic=14465.msg174209#msg174209
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.

Jeff_M

  • King Gator
  • Posts: 4094
  • C3D user & customizer
Re: AutoStart Netload when debugging.
« Reply #2 on: January 13, 2007, 08:56:40 PM »
Thanks for this, Kerry. I've been using my acad.lsp file to load them, but I didn't really like that solution since I also need to do real work and I don't like having my test apps loading into my working environ. This should solve that problem.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: AutoStart Netload when debugging.
« Reply #3 on: January 13, 2007, 09:18:45 PM »
my pleasure Jeff

.. necessity is the mother, heh !
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.

jmaeding

  • Bull Frog
  • Posts: 304
  • I'm just here for the Shelties.
Re: AutoStart Netload when debugging.
« Reply #4 on: January 14, 2007, 11:43:37 AM »
Thanks for giving the pics you did, I had been wondering if the start arguments were for the acad prog  or the tool (although classes will not have command line arg's only exe's) - obviously they are for the debug prog so that is cool.
Another thing besides scripts I will use that for is setting the profile.
My profile for doing designing/drafting has all kinds of menus and tools loaded, it slows down the opening.  So I will make a "bare" profile and use that for debugging, should speed up the startup.
thanks
James Maeding

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: AutoStart Netload when debugging.
« Reply #5 on: January 14, 2007, 04:21:05 PM »
Happy to share James ..
I'm now using that line for profile and template .dwt as well .. also with the goal of speeding up the initialisation/load of ACAD.

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.