I have an open source application, in which I can import shapes from CAD files like.iges, .step, .brep. After import, I can set some properties of shapes like material, color, transparency etc. The UI of application is written in C#, but
the data model and viewer is written in C++. I want that coded UI test builder could recognize my imported shape.
My code looks like this:
public class Form2 : System.Windows.Forms.Form
myView = new shell();
public void InitV3D()
if( !myView.InitViewer(this.Handle) )
MessageBox.Show("Fatal Error during the graphic initialisation", "Error!",
public void ImportModel(ModelFormat format)
if (!myView.TranslateModel(filename, theformat, true))
MessageBox.Show("Cann't read this file", "Error!",
I have wrapped the class AIS_Shape so it can be used from C#. First of all I want to get the accessible information of my shape. I have explored the sample "Enable Coded UI Testing of Your Custom Controls".
I started with "Chart Control" example. In this example the CurveLegend control used like a field of ChartControl which derives from System.Windows.Forms.UserControl, but my shape doesn't use like field in any class. I just have the class "shell" which
is a field of my form, and the class "Viewer" which is a field of the class "shell".
Unfortunately, I can't get enough information from sample to do this. Could you help me, please?