How to Reference a Schema into Primary Schema


Applies To 
Product(s):OpenPlant PID
Version(s):08.11.10.XXX (SS5) | 08.11.11.XXX (SS6)
Environment: Windows 7/8.1/10 (64 bit)
Area: Class Editor
Subarea: Reference
Original Author:Harpreet Singh, Bentley Product Advantage Group

Background

User added all his custom properties in OpenPlant_ProjectProperties.01.07 schema and want to see all these properties in class editor by loading only OpenPlant_PID.01.07 schema. Currently, it shows the properties and classes of OpenPlant.01.07 schema its own classes and properties. For this example, a test property is added in PLANT_BASE_OBJECT class of OpenPlant_ProjectProperties.01.07 schema as shown below.

Steps to Accomplish

  1. Open OpenPlant_PID.01.07 schema in notepad. This schema is located in C:\ProgramData\Bentley\OpenPlantPID (SS6)\WorkSpace\Projects\%PROJECT%\Dataset\schemas folder.



  2. Add below line in the schema in references section as shown in the picture below.

        <ECSchemaReference name="OpenPlant_ProjectProperties" version="01.07" prefix="opproj" />



  3. Find PLANT_BASE_OBJECT class in OpenPlant_PID.01.07 schema in notepad.



  4. Add below line to add base class in PLANT_BASE_OBJECT.

            <BaseClass>opproj:PLANT_BASE_OBJECT</BaseClass>



  5. Save the changes and load OpenPlant_PID.01.07 schema in class editor.



  6. You will see the property in the schema without opening OpenPlant_ProjectProperties.01.07 schema.

See Also

communities.bentley.com/.../19903.locate-missing-reference-schema-files-message-while-loading-schema-in-class-editor

Comments or Corrections?

Bentley's Product advantage Group requests that you please confine any comments you have on this Wiki entry to this Comments or Corrections?" section. THANK YOU!