# Compiling the tutorial project

A project meant for learning development of SimObjects can be dowloaded by:

git clone ssh://git@git.code.sintef.no/fhsim/fhsimtutorial.git


If your environment is set up correctly, and you have the correct access to Artifactory, you should be able to compile this project with visualization by running:

cd <PROJECT_DIR>
mkdir buildvis
cmake -Ax64 -DFH_VISUALIZATION=1 ..
cmake --build . --config Release --target install
cmake --build . --config Debug --target install


You should now have a Visual Studio solution file in <PROJECT_DIR>/buildVis.

# Running a simulation based on the tutorial project

## From Visual Studio

In the following, it is assumed that you are using the Debug configuration and have built the project with visualization.

1. In the Solution Explorer, right click on FhsimTutorialLibrary and select Set as startup project.
2. In the Solution Explorer, right click on FhsimTutorialLibrary and select Properties.
3. Click Debugging
4. Set the following:
• Command: FhVis_d
• Command arguments: <INPUT_FILE>
• Working Directory: <PLAYPEN_DIR>/bin
5. Press <F5> to start the simulation.

Some of these properties may be found using the browse-button.

• <INPUT_FILE> may e.g. be C:_work_DEV_FhSim\fhsimTutorial\input\MassLinearSpring.xml
• <PLAYPEN_DIR> may be e.g. C:_work_DEV\FhSimPlayPen_vs14-64

## From the command prompt on Windows

Start a command prompt and execute the following:

cd <PLAYPEN_DIR>/bin
FhRtVis_d <INPUT_FILE>