Example of publish customization (SPPublishPlugin) - Integration - Update 46 - Help - Hexagon

SmartPlant Integration .NET Help

Language
English
Product
Integration
Search by Category
Help
SmartPlant Foundation / SDx Version
10
Smart P&ID Version
9 (2019)
Smart Engineering Manager Version
10 (2019)

This example shows how the SPPublishPlugInAssemblyTypeName registry value determines which implementation it executes. The example source code for publish customization is in the installation directory under \SP Test Tool\Source\SPCLTestToolWPF\SPCLTestToolCustomProcessSample folder.

Registry modifications must be entered correctly. Incorrect entries and values may result in serious damage to your system. You must back up any valued data before making any changes to the registry.

These classes in the example code demonstrate that one assembly can contain more than one implementation of publish customization, such as the following, each prefixed with SPCLTestToolCustomPublish:

  • AddObject

  • ModifyObject

  • DeleteObject

  1. In Registry Editor, locate the HKEY_LOCAL_MACHINE\SOFTWARE\Intergraph\Intergraph SmartPlant Client.NET registry key.

  2. Create a new registry key under Intergraph SmartPlant Client.NET, and call it CustomPlugIns.

  3. Create a new registry key under CustomPlugIns, and call it SP Test Tool.

  4. Under SP Test Tool, create a new string value called SPPublishPlugInAssemblyPath and change the value to <Full path including the filename of SPCLTestToolCustomProcessSample.dll> (for example, C:\Program Files\SmartPlant\SmartPlant Client.NET\SP Test Tool\SPCLTestToolCustomProcessSample\bin\debug\SPCLTestToolCustomProcessSample.dll).

  5. Under SP Test Tool, create a second new string value called SPPublishPlugInAssemblyTypeName and change the value to Intergraph.SPClient.SPCLTestToolCustomProcess.SPCLTestToolCustomPublishAddObject.

    SHARED Tip The Registry Editor should look like the following example:

    registry_editor

  6. In SmartPlant Test Tool.Net, publish a document and review the details displayed in the progress window to confirm that SPCLTestToolCustomProcessSample added item P-008 as expected.

    SHARED Tip To review the details, use SmartPlant Foundation Desktop Client to show all relationships on the document you publish after the document is loaded.

  7. In SmartPlant Foundation Desktop Client, log on to the SmartPlant Foundation site and plant to which you published, and confirm that SPCLTestToolCustomProcessSample added item P-008 as shown in the following example, where the description shows that the pump was added in CustomPublish.

    SPF desktop client test publish retrieve

See Also

SmartPlant Test Tool.Net source code
Build the example source code delivered with SmartPlant Client.Net
Example of retrieve customization (SPRetrievePlugin)
Examples of Publish dialog box customization (SPCustomPublishDialog)