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
-
Currently, only SPCLTestToolCustomPublishAddObject is fully implemented.
-
You must have already built the SPCLTestToolCustomProcessSample.dll. See Build the example source code delivered with SmartPlant Client.Net for more information.
-
In Registry Editor, locate the HKEY_LOCAL_MACHINE\SOFTWARE\Intergraph\Intergraph SmartPlant Client.NET registry key.
-
Create a new registry key under Intergraph SmartPlant Client.NET, and call it CustomPlugIns.
-
Create a new registry key under CustomPlugIns, and call it SP Test Tool.
-
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).
-
Under SP Test Tool, create a second new string value called SPPublishPlugInAssemblyTypeName and change the value to Intergraph.SPClient.SPCLTestToolCustomProcess.SPCLTestToolCustomPublishAddObject.
The Registry Editor should look like the following example:
-
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.
To review the details, use SmartPlant Foundation Desktop Client to show all relationships on the document you publish after the document is loaded.
-
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.