Configuring the Desktop Client to load our custom assemblies - SmartPlant Foundation - IM Update 44 - Customization & Programming - Hexagon

SmartPlant Foundation Customization

Language
English
Product
SmartPlant Foundation
Search by Category
Customization & Programming
SmartPlant Foundation / SDx Version
10

The next step is to make the Desktop Client aware of our customization code. This is done through the Desktop Client configuration file named Desktop_Client.exe.config located in the (C:\Program Files (x86)\SmartPlant\Foundation\SPFDesktopClient\CurrentVersion) folder. This file is XML in format and may be edited with any text editor. Within that config file, you will find a section for custom assemblies identified by the XML node

<CustomAssemblies>.

In this node, we will configure our custom assembly like this:

<customAssemblies>

<add key="SPF.Client.Training" value="SPF.Client.Training.dll" />

</customAssemblies>

The key attribute is not really significant so you can give it any unique name. However, the value must be exactly the path to the assembly we created. If you defined its compilation directory to be the same directory as the other client .dlls, you don't need to prefix it with a path.

This configuration will cause the Desktop Client to load our custom assembly upon start-up.