Callback event for all scripts loaded

Callback event for all scripts loaded

Anonymous
Not applicable
818 Views
2 Replies
Message 1 of 3

Callback event for all scripts loaded

Anonymous
Not applicable

I am trying to understand the best notification callback to use at the point that ALL startup scripts have loaded - i.e. that 3DSMax has stabilised and is ready to receive (external) commands. From my investigations it would seem that some scripts are still loading after #postSystemStartup fires. The next event would seem to be #filePreOpen, #systemPreReset or #systemPreNew but these require an action on the part of the user.

 

Is there another event which fires later?

 

Secondarily I would also be able to interrogate the the OLE interface (as set up by registerOLEInterface ) to confirm what functions have been registered.

 

Any help appreciated.

0 Likes
819 Views
2 Replies
Replies (2)
Message 2 of 3

kevinvandecar
Community Manager
Community Manager

Hi Stephen, Well, there is no easy way to know exactly because other scripts may also be using the same callback. So it's about the callback order, and this is not easy to determine. I think the real question is about what are you trying to accomplish and why isn't the postSystemStartup enough for whatever task you are trying to run?

 

About the OLE availability, in theory it should also be ready by the time your postSystemStartup callback is called. Do you see a circumstance where this is not true?

 

thanks,

kevin

 

 


Kevin Vandecar
Developer Technical Services
Autodesk Developer Network



0 Likes
Message 3 of 3

Anonymous
Not applicable

Dear Kevin, 

 

The main thing I need to know is: how long from launch does it take until the application is "ready"; which in my case means that the OLE interface is set up (and ideally all startup scripts loaded, although the ones required by the OLE scripts will be loaded).

 

I am using a small script called by various callbacks to simply log the time of the callback.

 

The callback knows if the OLE is set up as I set a global to true immediately after the registerOLEInterface call - i don't know any other way of checking if the OLE interface is reqistered.

 

In all cases the #postSystemStartup callback is reporting that OLE is NOT yet set up.

 

Regarding your first point, surely its the case that scripts don't use the callback, but a callback uses one or more scripts? I would have thought that the order of callbacks was exactly pre-determined otherwise whats the point of them? If you mean the order of scripts called by ONE callback, then I understand. However in this case for nearly all callbacks there is only the one script - mine.

 

Regards,

Stephen

0 Likes