Run some code on plugin load.

Run some code on plugin load.

deusextechnic
Advocate Advocate
864 Views
1 Reply
Message 1 of 2

Run some code on plugin load.

deusextechnic
Advocate
Advocate

Hi,

 

I have a plugin for Navisworks in .net (C#) and I am trying to run some code to show a splashscreen when navisworks starts or the first time the plugin is used during the session. Whichever is easier. No luck so far. Is there an initialize event or similar available? Any advice appreciated.  

0 Likes
865 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

I know this is possible because I have a side project that is an always on input watcher hooked into windows messaging services. Oddly enough the InputPlugin type wasn't what I needed because it couldn't see everything. Now I believe I am using the EventWatcherPlugin type, which gives me override access to the OnLoaded method. With it, I get such early access to user input that I am currently battling fatal errors from it intercepting event while it is still busy loading NWF's. You might try adding a relatively empty secondary plugin call that will at least give you OnLoaded access. It is volatile though, I am warning you.

 

Also by doing this level of intrusion for your splash screen could possibly cause your plugin to be rejected by Autodesk if your trying to put it in the app store; if your into that kind of thing.

 

Here is a lead on what I am referring to:

http://spiderinnet.typepad.com/blog/2014/05/create-navisworks-net-eventwatcherplugin-using-naviswork...