How to Setup & Use OpenPlantSDK Examples in OpenPlant Modeler



Applies To 
Product(s):OpenPlant Modeler
Version(s):

CONNECT Edition 10.07.00.32 & above

Environment: Windows 10 (64-bit)
Area: OpenPlant Modeler SDK
Subarea: SDK Example Setup
Original Author:Deepak Singh,Bentley Product Advantage Group

With the installation of OpenPlant Modeler CONNECT Edition we have SDK Examples available at installation folder. In this article, we will explore how to setup and use those SDK in OpenPlant Modeler CONNECT Edition.

Background

To use the example SDK in OpenPlant Modeler, we need to build the solution first so that all the necessary setups (like references, links) will be configured properly. In this article, we will explore building the solutions for sample examples along with its placement in OpenPlant Modeler. As a prerequisite Visual Studio must be installed to the machine.

Note: To test the output, you need to test in metric projects only as examples have been created considering the project unit of metric.

Steps to Accomplish

  1. Using File Explorer, navigate to below mentioned location.



  2. Select Developer Command Prompt for VS 2017 and run it in admin mode as shown below.



  3. This will prompt Developer Command Prompt as shown below.



  4. Type cd (space) [path of SDK Examples], refer below mentioned command line as shown below.

    cd C:\Program Files\Bentley\OpenPlant CONNECT Edition\OpenPlantModeler\SDKExamples



  5. Click on enter to execute the command argument.
  6. Enter below mentioned command arguments as shown below. Click on enter once argument has been defined.

    OpenPlantModelerDeveloperShell.bat "C:\Program Files\Bentley\OpenPlant CONNECT Edition\OpenPlantModeler\" "C:\Program Files\Bentley\OpenPlant CONNECT Edition\OpenPlantModeler\SDKExamples\"



  7. Enter last argument to load OpenPlantModelerSDKExamples.sln as shown below.

    OpenPlantModelerSDKExamples.sln



  8. Click on enter, command window will execute the entered arguments successfully & it will automatically load Visual Studio application as shown below.



  9. Notice that in Visual Studio, all programs loads successfully along with its references. Refer image as shown below.



  10. From Solution Explorer, right click on OpenPlantModelerSDKExamples & select Build Solution. Refer image as shown below.



  11. Notice that in Output window, we can see build succeeded. Please note that there should not be any error to the output window upon building the solution.



  12. Since our solution has been built successfully, we will test the sample SDK upon evoking key-in in OpenPlant Modeler. Since, in the article we are considering the example of support placement on pipe we will execute that exercise here.
  13. Load OpenPlant Modeler in metric project unit only.
  14. Open a blank model file & evoke below key-in as shown below.

    Key-in: mdl load SupportExample

  1. Once executed, run next key-in as mentioned below.

    Key-in: supportexample Example1


  2. Once key-in is executed, do fit view & notice that on a pipe one support is placed automatically.



    Note: To check multiple type of examples, please open ReadMe.txt from below mentioned path to have details on key-ins that need to be executed.

See Also

communities.bentley.com/.../how-to-automate-desired-port-setting-for-placement-of-hvac-round-components-in-openplant-modeler-connect-edition-update-7

Still a Problem?

If above problem still persists, then please create a Service Request and contact the Bentley Product Advantage group.  Please include a list of all relevant details to get in depth analysis for a solution or workaround.