[OpenPLANT CE U5 c#] Getting Started Samples

Hi,

I'm considering to develop an IFC exporter for OpenPLANT.

I've downloaded and found the samples in the folder C:\Program Files\Bentley\OpenPlant CONNECT Edition\OpenPlantModeler\SDKExamples

These look very helpful, but I can't work out how to load them.

I changed the dotnet version to 4.6.2, and updated the dll references and the project builds fine.

Readme information is below.

I found the MDL application button that allows to browse (default .ma file) but no .ma file is created from the samples.  Selecting a dll fails from the browse with a message such as 

> MDL Loader: Could not load application C:\temp\openPlant\SDKExamples\PipingExample\mdlapps\PipingExample.dll

How do I generate a .ma file as part of the build?

I do see in the folder C:\Program Files\Bentley\OpenPlant CONNECT Edition\OpenPlantModeler\Mdlapps pairds of dll and ma files.

I have searched the forum and wider web for suggestions but not found any answers.

Grateful for any advice,

Jon

> Piping Examples:
>These examples demonstrate placement of various piping components.
>These examples must be run in Metric Project.
>KeyIn:
>To load the examples, use the following keyin.
>mld load PipingExample
>There are four examples which are briefly described below.
>Exampl1:
>This example demonstrates placement of simple piping components connected to each other.
>KeyIn:
>To run this example, use the following keyin.
>PipingExample Example1

Parents
  • Hi Jonathan,

    I have no experience with OpenPlant, but because it's (I assume) based on PowerPlatform (MicroStation engine), the same rules and best practices can be applied here.

    I found the MDL application button that allows to browse (default .ma file)

    I recommend to load applications using a standard key-in mdl load <file>, because it search for the application in configured folder(s) only, whereas using the button you can browse anywhere.

    but no .ma file is created from the samples

    This is correct. When pure managed (NET) application is created (compiled), dll assembly is created only. At background, MicroStation can create the application loader, which is .ma file, but it's internal feature and a user never load this .ma file directly.

    Selecting a dll fails from the browse with a message such as

    Managed addins (in a form of .dll assemblies) can be loaded only from folder configured in MS_ADDINPATH, not from "some folder".

    How do I generate a .ma file as part of the build?

    As I wrote above, .ma file is not required.

    I do not know examples delivered with OpenPlant CE SDK, but in MicroStation SDK, the examples are configured in such way that when Visual Studio is started from SDK shell and the application is compiled (or the solution is compiled using bmake file), the final files are copied to mdlapps folder, which is configured in MS_ADDINPATH already, so the examples can be easily loaded by user using both selectin dll file and the key-in. It requires to use Administrator's rights usually.

    Installed applications typically modified MS_ADDINPATH to allow MicroStation to load assemblies from other folders also.

    I have searched the forum and wider web for suggestions but not found any answers.

    It's weird, because I am sure in MicroStation Programming forum this issue was discussed several times.

    With regards,

      Jan

    Answer Verified By: Jon Mirtschin 

  • Thanks, that's very helpful and I've managed to load and run the sample now.

Reply Children
No Data