.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

startup routines and publishing

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
299 Views, 5 Replies

startup routines and publishing

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
5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: Anonymous

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?
Message 3 of 6
RonnieWilkins
in reply to: Anonymous

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.
Message 4 of 6
Anonymous
in reply to: Anonymous

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
Message 5 of 6
Anonymous
in reply to: Anonymous

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
Message 6 of 6
Anonymous
in reply to: Anonymous

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 😉

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost