Hi everyone!
The function I want to achieve: when the plug-in is opened from the [window] of the ai interface, the data is obtained from the ai canvas and displayed in the plug-in UI.
At present, when the plug-in is opened from the [window] of the ai interface, the event that the plug-in fails to load the canvas is not triggered, and the plug-in fails to receive SPMessageData.
But when the plug-in is opened from [file], the event of loading the canvas is triggered, and the plug-in receives SPMessageData.
I want to know what to do so that when [window] opens the plug-in, the same code processing is triggered as when the plug-in is opened from [file].
When opening the plug-in from [Window] according to the click order in the figure below, the content of art in the ai canvas cannot be loaded in the plug-in window, and the callback function that calls the registration of the plug-in is not found when it is opened by this method.


When the plug-in is opened from the [file] menu button according to the click sequence in the figure below, the content of the canvas is displayed in the plug-in, and the registered callback function of the plug-in will be called at this time.

