Some projects may require constraint categories and sub-categories that are more specific than those delivered with Smart Construction. This functionality allows you to create your own constraint categories and sub-categories for your unique, specific project needs.
Create load file or open existing load file
You can either create a new load file for your custom categories and sub-categories, or you can modify the existing load file 04_SPC_ConstraintEnumSchema.xml that holds the existing constraint categories and sub-categories. You can find this load file in the 001-Schema folder in the Smart Construction installation location. For example, browse to [Drive]:\Program Files\SmartConstruction\LoadFiles\Current\001-Schema. See Load the constraint enumerated list schema for more information.
If you want to create a new load file, follow the steps below.
-
Open the text editor of your choice. See Create a load file for more information.
-
Add the following tag to the top of the file.
<Container CompSchema="MetaSchema" Scope="Schema" SoftwareVersion="10.00.38.0025" IsValidated="False" Dependencies="01_SPC_AuthoringSchema.xml" MetaSchemaExtensions="SCHEMA_SchemaComponentCodedExtensions.xml%SCHEMA_SchemaComponentCodedExtensionsFixes.xml%SCHEMA_SchemaComponentDisplayNameFixes.xml%SCHEMA_SchemaComponentFixes.xml%SCHEMA_SchemaComponentExtensions.xml" SPFMeta="ASPFP" ContainerID="SRPPF.Custom.Constraints" SDECIMAL=".">
Create a custom constraint category
-
If you created a new load file, add the following tag into the load file underneath the opening tag. If you are modifying an existing load file, add the following entry wherever the other <EnumListType> tags are.
<EnumListType>
<IObjectUID="" Name=""/>
<ISchemaObj SchemaRevVer="" ByCust="True"/>
<IPropertyType/>
<IEnumListType/>
<IEnumEnum EnumNumber=""/>
-
Enter the Unique Object Identifier (UID) that you choose for the IObjectUID tag.
-
Enter the name for the category as you want it to appear in Smart Construction for the Name section in the <IObjectUID> tag.
-
Enter the schema version for the properties that are loaded to Smart Plant Foundation for the SchemaRevVer section.
-
Enter the number you choose for the EnumNumber section.
-
Add the following entry into the load file anywhere underneath the previous entry.
<Rel>
<IObject UID="" />
<ISchemaObj ByCust="True" SchemaRevVer="" />
<IRel UID1="SPCConstraintCategory" DefUID="Contains" UID2="" />
</Rel>
-
Enter the Unique Object Identifier (UID) that you choose for the IObjectUID section
-
Enter the schema version that you provided in step 4 for the SchemaRevVer section.
-
Enter the UID of the category for the UID2 section.
Create custom constraint sub-category
-
Add the following entry to the load file.
<EnumEnum>
<IObjectUID="" Name=""/>
<ISchemaObj ByCust="True"/>
<IEnumEnum EnumNumber=""/>
</EnumEnum>
-
Enter the Unique Object Identifier (UID) that you choose for the IObjectUID section.
-
Enter the name for the sub-category as you want it to appear in Smart Construction for the Name section.
-
Enter the number you choose for the EnumNumber section.
-
Add the following entry to the load file. This entry connects the sub-category to the appropriate parent category.
<Rel>
<IObjectUID="" ContainerID=""/>
<ISchemaObj ByCust="True" SchemaRevVer=""/>
<IRelUID1="" DefUID="Contains" UID2=""/>
</Rel>
-
Enter the Unique Object Identifier (UID) that you choose for the IObjectUID section.
-
Enter the version for the SchemaRevVer section. This must match the schema version given for the parent category.
-
Enter the UID of the parent category for the IRelUID1 value.
-
Enter the UID of the sub-category for the UID2 value.
Load the load file into Smart Construction
You must load the load file into Smart Construction whether you created a new load file or edited the existing load file.
-
Log on to SmartPlant Foundation Desktop Client in your Smart Construction site as an administrator.
-
Click File > Loader.
-
Browse to the file you created or modified and select it.
-
Click Process to display the results of the load in the Processed load files list.
-
Click Load Results to view load process details.
Example: new load file
<?xml version ="1.0" encoding="UTF-8"?>
<Container CompSchema="MetaSchema" Scope="Schema" SoftwareVersion="10.00.38.0025" IsValidated="False" Dependencies="01_SPC_AuthoringSchema.xml" MetaSchemaExtensions="SCHEMA_SchemaComponentCodedExtensions.xml%SCHEMA_SchemaComponentCodedExtensionsFixes.xml%SCHEMA_SchemaComponentDisplayNameFixes.xml%SCHEMA_SchemaComponentFixes.xml%SCHEMA_SchemaComponentExtensions.xml" SPFMeta="ASPFP" ContainerID="SRPPF.Custom.Constraints" SDECIMAL=".">
<EnumListType>
<IObject UID="SPC_Constraint_NewCategory" Name="New Category"/>
<ISchemaObj SchemaRevVer="04.02.01" ByCust="True"/>
<IPropertyType/>
<IEnumListType/>
<IEnumEnum EnumNumber="3"/>
</EnumListType>
<Rel>
<IObject UID="SPCConstraintCategory.Contains.SPC_Constraint_NewCategory" ContainerID="SPC.Schema.ConstraintEnums" />
<ISchemaObj ByCust="True" SchemaRevVer="04.02.01" />
<IRel UID1="SPCConstraintCategory" DefUID="Contains" UID2="SPC_Constraint_NewCategory" />
</Rel>
<EnumEnum>
<IObject UID="SPC_Constraint_NewSubCategory1" Name="New SubCategory 1"/>
<ISchemaObj ByCust="True"/>
<IEnumEnum EnumNumber="1"/>
</EnumEnum>
<EnumEnum>
<IObject UID="SPC_Constraint_NewSubCategory2" Name="New SubCategory 2"/>
<ISchemaObj ByCust="True"/>
<IEnumEnum EnumNumber="2"/>
</EnumEnum>
<Rel>
<IObject UID="SPC_Constraint_NewCategory.Contains.SPC_Constraint_NewSubCategory1" />
<ISchemaObj ByCust="True" SchemaRevVer="04.02.01" />
<IRel UID1="SPC_Constraint_NewCategory" DefUID="Contains" UID2="SPC_Constraint_NewSubCategory1" />
</Rel>
<Rel>
<IObject UID="SPC_Constraint_NewCategory.Contains.SPC_Constraint_NewSubCategory2" />
<ISchemaObj ByCust="True" SchemaRevVer="04.02.01" />
<IRel UID1="SPC_Constraint_NewCategory" DefUID="Contains" UID2="SPC_Constraint_NewSubCategory2" />
</Rel>
</Container>