Customization > SySim- SysML model execution > Generating and building a SySim model execution > Setting up the SySim model execution form (SySim)
  
Setting up the SySim model execution form (SySim)
Preparing a SysML model for SySim
Modeling a SySim model execution
Generating and building a SySim model execution:
Setting up Microsoft Visual Studio to work with SySim
Generating the Visual Studio project for the SySim model execution
Setting up the SySim model execution form
Building the SySim model execution
Building the Simulink shell
Working with a SySim model execution
After generating the Visual Studio project, you must set up the Visual Basic form that is used for the SySim model execution.
When you save the Visual Basic form that is generated for the SySim Simulation Scenario Block, ACS reverse engineers the design of that form to the model. Next time the SySim model execution is generated, the design of the form is generated from the design that was reverse engineered. If you want to delete the reverse engineered information so that a blank form is generated: right-click the SySim Simulation Scenario, point to SySim, and then click Reset Form.
To set up the SySim model execution form:
1. Ensure that you have generated the Visual Studio project. How?
2. Start SySim. How?
3. In the SySim Simulator list, select the SySim Simulation Scenario Block for which you want to set up the SySim model execution form.
4. In the Microsoft(TM) Visual Studio Control group, click the Open Visual Studio button.
If the Open Visual Studio button is not available:
a. In the SySim Control group, click the Open Executable Folder button.
b. In the Window that is opened, double-click the Visual Studio project file that SySim generated.
The name of the Visual Studio project is determined by the SySim Project Name that is set in SySim: <SySim project name>.vbproj.
c. In the Solution Explorer pane, open the Visual Basic form that SySim generated for the SySim Simulation Scenario Block. The location and name of this form is as follows:
<SySim private subdirectory\<SySim Simulation Scenario Block name>Form.vb
Where:
<SySim private subdirectoryis a folder whose name is specified by the SySim Private Subdirectory box in SySim.
<SySim Simulation Scenario Block name> is the name of the SySim Simulation Scenario Block in the model, for which the form is being generated.
5. If the Toolbox pane is not shown in Visual Studio: on the View menu, click Toolbox.
6. In the Toolbox pane, expand the <project name> Components entry to see the controls that SySim has generated.
If the <project name> Components entry does not appear in the Toolbox pane, build the project so that the Toolbar pane is populated with the SySim components:
On the Build menu, click Build Solution, or
On the Debug menu, click Build <project name>.
7. Drag each SySim generated control from the Toolbox to the Visual Basic form.
Ensure that you drag the SySimControlBar_<project name> control to the Visual Basic form. This control allows you to start and stop the SySim model execution.
8. Through the Properties pane, set the properties of each control as required. PTC provided SySim control blocks
9. Save the Visual Basic form and the Visual Studio project.
After setting up the SySim model execution form, you can build the SySim model execution application. Building the SySim model execution application