43.2.8. Converting a ProcessNet C# (VSTA) Project into a ProcessNet C# (General) Project

Opening Projects in Visual Studio 2010

  1. ProcessNet C# (VSTA) uses VSTA project files. To open these files in Visual Studio, you must edit them as follows.

  2. Edit the .csproj file that contains ThisApplication in Notepad or another editing program.

  3. Delete <ProjectTypeGuids> in <PropertyGroup>.

    ../_images/image03917.png
  4. Open Visual Studio and convert the project using the Convert Project dialog window.

Deleting VSTA Codes

  1. When you open a converted project, you can see an xml file and a designer.cs file under ThisApplication.cs.

    ../_images/image04018.png
  2. You can delete these files because they are necessary only in ProcessNet (VSTA).

  3. In the ThisApplication.cs file, delete the region named VSTA generated Code.

  4. In the ThisApplication.cs file, delete the CloseWindow() function. If the user uses this function, do not delete the function.

    ../_images/image04113.png

Declaring the RecurDyn Application

  1. To access the RecurDyn Application without using VSTA, declare IRecurDynApp under the common variables, as highlighted in the following code.

    ../_images/image04218.png

Editing the Initialize() Function

  1. Edit the highlighted code in order to import an application using the app variable declared before the Initialize() function.

    ../_images/image04318.png

Now, you can build the edited project and use it in ProcessNet General.