You can review the PDS schema and use an existing property and interface for the mapping. However, if there is no available interface or property that matches your custom property, this exercise shows you how to accomplish mapping by creating a new interface and property in the PDS schema.
-
To start the Schema Editor, select Start > Intergraph SmartPlant Foundation > SmartPlant Schema Component > SmartPlant Schema Editor > Developer.
-
On the Workflows dialog, click the Schema tab, and then click Open.
-
Navigate to your PDS project folder and select P3DComponent.xml.
-
On the Tool Schema tab, click Open.
-
Navigate to your PDS project folder, and then select the PDS3DToolMapSchema file.
-
Click View to open the P3DComponent.xml file in the Schema Editor.
-
Under the ClassDef node, locate and expand the PDS_Dwg_Piperun node.
-
To create the new interface, expand the PDS_Dwg_PipeRun classdef and right-click Realized Interface Definitions. Select Create InterfaceDef.
-
On the left side of the New Interface Definition dialog, type the new interface name, IRunCustomProperties. Type a brief description and the display name. Select a property category such as Miscellaneous.
-
On the right side of the New Interface Definition dialog, select IObject for Implies interface definitions and select IPipeRun for Implied by interface definition. Click OK to finish.
-
To create the new property, locate and expand the new IRunCustomProperties interface under Realized Interface Definitions. Right-click Exposed Property Definitions and select Create PropertyDef.
-
On the New Property Definition dialog, type Process_Code as the new property name. Enter the information below, and then click OK to close the dialog.
-
Description: Process Code
-
Display name: Process Code
-
Exposed by interface definition: IRunCustomProperties
-
Scoped by property type: string
-
Needs further analysis: False
-
-
Select File > Save > Schema File to save the new interface and property in your PDSComponent schema file. If you do not save, your new interface and custom property do not display for mapping.
-
Close the current dialog to go back to the main Workflows dialog.
-
Click View to open the PDS3DToolMapSchema tool schema file in the Schema Editor.
Map custom property to the PDS new interface and property
Now you are ready to map the custom property process_code in the PDS tool schema to the new Process_Code property in the PDS Component schema.
-
Under SPMapClassDef, locate PDS3DPipingSegment, and then right-click Edit PDS3DPipingSegment.
-
Click the Overview tab, and then click Graphical Publish Mapping.
-
On the Show Mapping for PDS3DPipingSegment dialog, locate IRunCustomProperties > Process_Code under Dynamic Schema Views on the right side of the dialog.
-
Locate the custom process_code under PDS3DToolMapSchema.xml on the left side of the dialog, and then drag it to the new Process_Code property to create the MapPropertyToPropertyDef relation.
-
Click OK to close the dialog, and then OK again to close Edit Map Class Definition.
-
Select File > Tool Map Schema to save the mapping.
Next: Export the PDS model.