.NET

Reply
*perry
Message 1 of 6 (109 Views)

startup routines and publishing

109 Views, 5 Replies
08-15-2006 08:45 AM
I have a routine which loads at acad startup and runs each time a new
drawing is opened or layout switched. Works just fine, but I DONT want
it to run if I'm plotting a batch of files via the sheetset manager.
I tried using the "CommandWillStart" event to catch the publish event
but it seems that publish doesnt fire an event, "PLOT" does however.
So my question is, how can I determine if Acad is batch plotting so
I can tell my routines NOT to run at that time?
Thanks, Perry
*perry
Message 2 of 6 (109 Views)

Re: startup routines and publishing

08-16-2006 10:36 AM in reply to: *perry
perry wrote:
> I have a routine which loads at acad startup and runs each time a new
> drawing is opened or layout switched. Works just fine, but I DONT want
> it to run if I'm plotting a batch of files via the sheetset manager.
> I tried using the "CommandWillStart" event to catch the publish event
> but it seems that publish doesnt fire an event, "PLOT" does however.
> So my question is, how can I determine if Acad is batch plotting so
> I can tell my routines NOT to run at that time?
> Thanks, Perry

Impossible?
Distinguished Contributor
RonnieWilkins
Posts: 454
Registered: ‎04-07-2003
Message 3 of 6 (109 Views)

Re: startup routines and publishing

08-16-2006 03:58 PM in reply to: *perry
depends on
(1)how you are loading the .NET add-in
(2)if batch is kicked off before autocad starts or after and .net add-in is already loaded,thus it cannot be unloaded.

(1)
If using Startup Wizard (appload) then i'm not sure.

If using demand loading via registry, then toggle loadctrls from to some value other than load at startup (bitflag 2).

Search ARX Help for 'Creating AutoCAD Subkeys and Values'

(2)You could add a sub to your add-in that can be called by other programs to un-hook the acad/drawing.
Ronnie Wilkins, Jr.
AMS CAD + CAFM Solutions
Sr. Solutions Developer
Autodesk Certified Instructor: Inventor
*perry
Message 4 of 6 (109 Views)

Re: startup routines and publishing

08-17-2006 07:46 AM in reply to: *perry
rwilkins wrote:
> depends on
> (1)how you are loading the .NET add-in
> (2)if batch is kicked off before autocad starts or after and .net add-in is already loaded,thus it cannot be unloaded.
>
> (1)
> If using Startup Wizard (appload) then i'm not sure.
>
> If using demand loading via registry, then toggle loadctrls from to some value other than load at startup (bitflag 2).
>
> Search ARX Help for 'Creating AutoCAD Subkeys and Values'
>
> (2)You could add a sub to your add-in that can be called by other programs to un-hook the acad/drawing.

I'm loading this .Net .dll via registry (demandload).
Yes, changing the values in the registry would prevent it from loading
but I would still need to know WHEN to do this. i.e. when is the
sheetset manager running a batchplot. Which was my original question.
Perry
*perry
Message 5 of 6 (109 Views)

Re: startup routines and publishing

08-18-2006 07:15 AM in reply to: *perry
perry wrote:
> I'm loading this .Net .dll via registry (demandload).
> Yes, changing the values in the registry would prevent it from loading
> but I would still need to know WHEN to do this. i.e. when is the
> sheetset manager running a batchplot. Which was my original question.
> Perry

Whats weird is before the call to sendstring, I can establish a document
object and echo stuff to the command prompt. So seems to me that there
IS a document, but sendstring says no
*perry
Message 6 of 6 (109 Views)

Re: startup routines and publishing

08-18-2006 07:20 AM in reply to: *perry
perry wrote:
> Whats weird is before the call to sendstring, I can establish a document
> object and echo stuff to the command prompt. So seems to me that there
> IS a document, but sendstring says no

Oops wrong thread :smileywink:
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.