Change handler for loaded max file??

Hello all and thanks for any help you can provide,

I have a script that "on open" reads in some info about the currently loaded max files Xref scenes. Basically just the name of the xref scene. Anyway, the name is displayed as a string in a rollout. My problem is, if I leave this rollout open and open another max scene, the name won't update and further bugs will come of it. I'm looking for a way to detect that the max file has been changed, as in, a different one or even a new one has been loaded; so then I can rerun my XRef scene function. I've looked at the change handler stuff in the help files, but it seems to only work on scene objects, no access to max file. Thoughts on how I can pull this off?

Thanks again,
Zac

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
miauu's picture

.

Open the maxScript help file and search for "callbacks".
Then go to the File Notification and try with
#FilePreOpen, #FilePostOpen.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.