Plugin not Loading at Startup but with opening of first file.

Hi
I'm relatively new to BricsCAD and have just migrated an AutoCAD plugin. In general its working and I'm now working through some issues. I notice that in my case BricsCAD isn't launching the Plugin until after I select a dwg file to open. On opening a file the IExtensionApplication.Initialize() method runs. This is at odds with AutoCAD that runs IExtensionApplication.Initialize() while AutoCAD is starting up (which I would expect). As a result some of the doc events are not firing within BricsCAD like DocumentBecameCurrent for example.
Should BricsCAD be launching plugins during initial launch or is it expected behaviour for them not to launch until the first file has been opened? I thought maybe there was a configurable option for this?

Comments

  • Hi. When I run my plugins, I check the list of previously opened documents and assign the events I need. As a result, I never noticed the problems you write about.

  • Set your STARTMODE so it doesn't show the startup panel and you will go directly into your first drawing and won't have any problems.

  • Thanks, Setting STARTUP to 0 does resolve it. But we won't have any influence on the STARTUP variable on customer sites so we have to assume that STARTUP is not 0 and come up with a workaround. We will probably end up putting some kind of "Doc Open" call in the Initialize() method to get around it. But its a bit odd that BricsCAD doesn't load plugins as the application initialises rather than when the first document opens.