Talou
Computer
- May 14, 2019
- 17
Hello,
I build a Catia command in CAA.
In the CAA code, I reorganize the Geometrical Set. (that work fine)
The I need to call Delete Useless Elements. I could call the Catia command “Delete Useless Elements” with CATAfrStartCommand. But I didn’t know how to click the “OK” button on the dialog that appear.
So I build a automation .exe (in CSharp) that will launch the “Delete Useless Elements” command and handle the dialog windows or warning message that appear from that Catia command. (that work fine)
My plan was to call my automation executable from the CAA. However, when launched from the CAA code. The automation exe is not allowed to interac with Catia.
It hang on:
INFITF.Application CATIA = (INFITF.Application)Marshal.GetActiveObject("Catia.Application");
I’m calling my automation executable with system:
sysRc = system( strCommandLine.ConvertToChar() );
I guess I should have tested that before writing my automation exe…
Does someone have a suggestion how to bypass that problem?
Thank you,
Talou;
I build a Catia command in CAA.
In the CAA code, I reorganize the Geometrical Set. (that work fine)
The I need to call Delete Useless Elements. I could call the Catia command “Delete Useless Elements” with CATAfrStartCommand. But I didn’t know how to click the “OK” button on the dialog that appear.
So I build a automation .exe (in CSharp) that will launch the “Delete Useless Elements” command and handle the dialog windows or warning message that appear from that Catia command. (that work fine)
My plan was to call my automation executable from the CAA. However, when launched from the CAA code. The automation exe is not allowed to interac with Catia.
It hang on:
INFITF.Application CATIA = (INFITF.Application)Marshal.GetActiveObject("Catia.Application");
I’m calling my automation executable with system:
sysRc = system( strCommandLine.ConvertToChar() );
I guess I should have tested that before writing my automation exe…
Does someone have a suggestion how to bypass that problem?
Thank you,
Talou;