Unable to select tree element after launching script

Ludovic WAGNER

Unable to select tree element after launching script


I'm currently developping a rather complex script to automate processing DMU in Catia V5R27 64 bits. One of the processing involves the comparison of the assembly against the environment.

I'm not going to detail all the code as I have many classes, but I basically initiate the comparison thanks to [b]CATIA.StartCommand iCommandId:="Compare Products"[b] and then use many Win32 (and a few UI Automation) functions to interact with the dialog box and to initiate the preview. The comparison appears in another CATIA.Window which I also manage to close thanks to my classes. So, I'm able to restore the CATIA state as it was before the script execution.. 

Suprisingly, when closing the window which displays the comparison, I'm unable to select elements in the CATIA tree, but I can select them in the 3D and then center the graph for example.

Does anyone have encounter similar issues?

Thank you!