To Troubleshoot Error Message "Unable to cast object of type 'System.DBNull' to type''System.String'


Applies To 
Product(s):OpenPlant Isometrics Manager CONNECT Edition
Version(s):10.xx.xx.xxx
Environment: Windows 10/11 (64 bit)
Area: Configuration
Subarea: Schemas
Original Author:Álvaro Melgarejo, Bentley Global Technical Support

Overview

User is unable to generate isometrics due to defective schema.

Problem Description

When trying to generate isometrics with OpenPlant Isometrics Manager, the user gets the error message "Unable to cast object of type 'System.DBNull' to type''System.String'.", which prevents them from generating the isometrics.

Steps to Resolve

  1. Navigate to C:\ProgramData\Bentley\OpenPlant CONNECT Edition\Configuration\WorkSpaces\<WORSPACE IN USE>\WorkSets\<WORKSET IN USE>\Standards\OpenPlant\Schemas
  2. Open OpenPlant_3D_Supplemental_Isometrics_Isoextractor.01.08.ecschema.xml with Notepad++.

  3. Press ctrl+F and look for:
    <IE_Mappings xmlns="OpenPlant_IsoExtractor_Custom_Attributes.01.08" />

  4. Replace that line with:
    <IE_Mappings xmlns="OpenPlant_IsoExtractor_Custom_Attributes.01.08">
        <END_POINT_ORDER_MAP />
        <OVR_END_PREPARATION />
    </IE_Mappings>
    Note: please mind the indentation of the schema.

  5. Close below, find lines:
    <L00_LABEL_SECTION_LABELS xmlns="OpenPlant_IsoExtractor_Custom_Attributes.01.08" />
    <SPECIFIC_BOM_LABELS xmlns="OpenPlant_IsoExtractor_Custom_Attributes.01.08" />

  6. Replace them with:
    <L00_LABEL_SECTION_LABELS xmlns="OpenPlant_IsoExtractor_Custom_Attributes.01.08">
        <LBL_SECT_LABELS />
    </L00_LABEL_SECTION_LABELS>
    <SPECIFIC_BOM_LABELS xmlns="OpenPlant_IsoExtractor_Custom_Attributes.01.08">
        <ATTRIBUTES />
    </SPECIFIC_BOM_LABELS>

  7. Save and close the schema.
  8. Relaunch OpenPlant Modeler, and generate the iso-sheet once again via the Pipeline Manager.
  9. Generate the isometric view, confirm that the error message is gone and the isometric was generated correctly.