Getting Started
The stepctl library is provided as part of ST-Developer and contains a Windows Form class with functions that you can use to read STEP files and display STEP 3D geometry contained within. There are also functions for querying some basic STEP product information, controling the display, color and transparency of items.
To get started, create a new .NET windows forms project in Visual Studio. The examples in this manual will use Visual Basic, but you can be use from any language that supports .NET calls, like C#, C++/CLI, or J#.
Next, add a reference to the stepctl library so that you can
access the functions it provides. Right Click on the project in the
Solution Explorer and select Add Reference ... from the context
menu. The Add Reference dialog box will appear as shown below. Go to
the Browse tab, then navigate to the ST-Developer bin directory under
"Program Files/STEP Tools" or "Program Files (x86)/STEP Tools".
Finally select the stepctl.dll file from the list.

In Visual Studio 2008, this will also add the forms provided by the DLL to the form design toolbox. In Visual Studio 2010, you must add them manually by clicking on the Tools | Choose Toolbox Items ... menu item, which will bring up a dialog, then under the ".NET Framework Components" tab, click Browse ... and select the DLL again.

By default, .NET projects may start with the solution platform set to "Any CPU". Because the stepctl library is a native executable, you must change the solution platform to "x86". Either right-click on the solution in the Solution Explorer, or click on the platform drop-down menu in the Visual Studio toolbar, and then select Configuration Manager ....
If there is no "x86" option in the Platform drop-down menu, select <New ...> as shown below. Then in the "New Project Platform" dialog, select "x86" for the new platform and then click "OK" for both dialogs to set the solution platform.

When using Visual Studio 2010, there is one other adjustment to make. By default your project will be configured to use the .NET 4.0 runtime which does not seem to work well with earlier versions. Double click on "My Project" in the Solution explorer, and then under the Compile tab, at the bottom select Advanced Compiler Settings. Change the Target Framework to "3.5 Client Profile" or earlier as shown below.

You can now place an instance of the GeomView control on your Windows Form application. Open the Toolbox menu. In Visual Studio 2008, the GeomView control will be near the bottom of the All Windows Forms group. In In Visual Studio 2010, it will be in a separate General group. In the example below, we have added a GeomView control as well as a button to load a file. The GeomView control does not display any contents while in the designer.

In this example, we have given the button control the Click handler shown below.
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
GeomView1.LoadSTEPFile("C:\Dave\mold_part.stp")
End Sub
End Class
This calls GeomView.LoadSTEPFile() function to load a STEP File and display the contents. The viewing window will use default values for everything, which means that it will center the geometry on the screen and dragging the mouse will rotate the view. Running the program and clicking the button gives us the results shown below. Continue to the Common Operations section to learn how to use the GeomView class for more tasks.


