This example shows how the SPRetrievePlugInAssemblyTypeName registry value determines which implementation it executes. The example source code for retrieve 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 retrieve customization, such as the following, each prefixed with SPCLTestToolCustomRetrieve:
-
AddObject
-
ModifyObject
-
DeleteObject
-
Currently, only SPCLTestToolCustomRetrieveAddObject 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, retrieve 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 retrieve after the document is loaded.
-
Open the TestN_Data.xml file.
SmartPlant Test Tool.Net writes the data in the retrieved document to a TestN_Data.xml file in the %TEMP%\SPTestToolRetrievedFiles\<SPF Site>_<SPF Plant>_<SP Test Tool Plant> folder.
-
In the TestN_Data.xml file, look for the following XML node to confirm that SPCLTestToolCustomProcessSample added item P-0088 as expected.
<NonDrawingItem_F>
<IObject Description="Pump added in CustomRetrieve" Name="P-0088" UID="U10088"/>
<INonDrawingItem/>
NonDrawingItem_F>