Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
OpenBuildings | AECOsim | Speedikon
  • Product Communities
  • Building
  • OpenBuildings | AECOsim | Speedikon
  • Cancel
OpenBuildings | AECOsim | Speedikon
OpenBuildings | AECOsim | Speedikon Wiki .NET error when selecting elements with manually attached EC data in the Item Browser
    • Building Design - Wiki
    • +OpenBuildings Designer
    • +OpenBuildings Energy Simulator
    • +GenerativeComponents
    • OpenBuildings Station Designer
    • +OpenBuildings Speedikon
    • +OpenBuildings Speedikon + Bentley Speedikon V8i
    • +Bentley Facilities Space Planner CONNECT Edition
    • -AECOsim Building Designer
      • +Annotation - AECOsim Building Designer
      • +Architectural Design - AECOsim Building Designer
      • +ASM (Analytical Space Model)
      • +Configuration - AECOsim Building Designer
      • +DataGroup System - AECOsim Building Designer
      • +Dataset and Content - AECOsim Building Designer
      • +Drawing Extraction - AECOsim Building Designer
      • +Drawing Views - AECOsim Building Designer
      • +Electrical Annotation and Design - AECOsim Building Designer
      • +Floors - AECOsim Building Designer
      • +Form Modeling - AECOsim Building Designer
      • +General - AECOsim Building Designer
      • +Grid Systems - AECOsim Building Designer
      • +HVAC Design - AECOsim Building Designer
      • +i-model - AECOsim Building Designer
      • +Import/Export - AECOsim Building Designer
      • +Installation - AECOsim Building Designer
      • +Modify - AECOsim Building Designer
      • -Platform Tools - AECOsim Building Designer
        • .NET error when selecting elements with manually attached EC data in the Item Browser
        • CONNECT Edition - Dimensions Are Larger Than Model
        • CONNECT Edition - Disrupted projection with Create Region tool
        • CONNECT Edition - How to change Z levels while moving elements
        • CONNECT Edition - Point Cloud not respecting visualization style
        • CONNECT Edition - Reference files don't allow color override setting
        • CONNECT Edition : Unable to find the Cell Library Dialog
        • Custom Linestyles change scale when using Copy to Clipboard and Paste to Clipboard
        • Dimensioning of Features on Walls
        • Extracting a text string between specific characters using Named Expressions
        • How to create 2D element array with variable
        • How to Create Parametric Objects using CEL (Parametric)
        • How to Determine the Placement Point of a Cell after it is placed?
        • How to Export from Item Browser to Excel
        • How to Manipulate a Reference
        • How to Open SKP Files in AECOsim Building Designer
        • How to reduce mesh faceting for cleaner drawing output
        • How to set reference sequence in AECOSim
        • Importing levels from an older version
        • Large Element Selections Slow to Move/Copy - Resolved in ABD SS6
        • Level in a reference file will not turn off using the Level Display tool
        • Material Editor is Missing Material Palette
        • Merge Design File
        • Plan view appears as a perspective orientation
        • Reference Level Display Manipulation
        • Save Relative Path function
        • Set Multi-Snap as default
        • Snap the corner of a structural beam or column
        • Snapping to Referenced Reality Meshes in AECOsim
      • +Plumbing Design - AECOsim Building Designer
      • +Print/Plot - AECOsim Building Designer
      • +ProjectWise Integration - AECOsim Building Designer
      • +Settings/Attributes - AECOsim Building Designer
      • +Space Planner - AECOsim Building Designer
      • +Structural Design - AECOsim Building Designer
      • +Utilities - AECOsim Building Designer
      • +Workspace - AECOsim Building Designer
    • +iModel Plugin for Revit
    • +Social Distance Assessments
    • Working from home with OpenBuildings products
    • Working from home with Speedikon
    • +Special Interest Group (SIG) FAQs
    • +Structural Modeler_PS
    • +Configuration Explorer
    • +Legacy Products
    • Learning Content for OpenBuildings Designer

     
     Questions about this article, topic, or product? Click here. 

    .NET error when selecting elements with manually attached EC data in the Item Browser

      Product(s): AECOsim Building Designer
      Version(s): 08.11.09.866
      Environment: N\A
      Area: Platform Tools
      Subarea: DevTools - API

    Error or Warning Message

    Cannot display the specified content in the grid.
    User Supplied Message: Cannot display the specified content in the grid.
    A NullReferenceException was thrown: System.NullReferenceException: Object reference not set to an instance of an object.

    Explanation

    I have manually attached EC schema data to elements in my 3D Model using the steps described here: http://communities.bentley.com/products/programming/microstation_programming/f/19569/p/76005/205473#205473  

    After, when using the Item Browser within AECOSim Building Designer SELECTserie6 (or Microstation) and clicking on these elements in the tree, I get the errors mentioned above.

    How to Avoid

    There is invalid metadata included in the schema that is causing this error, specifically, ‘IECArrayType containerProperty = m_instance.ClassDefinition[m_adhocSpec.AdhocPropertyContainer].Type as IECArrayType’, where ‘m_adhocSpec.AdhocPropertyContainer’ is “P02”, and there is no “P02” property in the schema or its base classes.  Since there are no properties which are of the correct type to be used as an adhoc value container, you should add a property of the correct type if you would like to use adhocs in this manner.

    Note: In CONNECT Edition products the underlying process is a bit different in that it allows more than one adhoc property container per class so doesn’t rely on ‘AdhocPropertySpecification’ to identify adhoc container property definitions.  Additionally the code which takes the input container property name and constructs the AdhocPropertyContainerDefinition properly checks that the container property name is valid.  The end result is that under the same scenario as outlined above in V8i, the Item Browser in CONNECT Edition will not throw any errors and the Properties dialog will display.

     

      Original Author: Steve Cocchi
    • 08.11.09.866
    • AECOsim
    • EC Schema
    • error
    • en
    • AECOsim Building Designer
    • SELECTsupport
    • Platform Tools
    • Share
    • History
    • More
    • Cancel
    • Steve Cocchi Created by Bentley Colleague Communities MVP Steve Cocchi
    • When: Mon, Feb 27 2017 5:49 PM
    • Steve Cocchi Last revision by Bentley Colleague Communities MVP Steve Cocchi
    • When: Mon, Feb 27 2017 5:53 PM
    • Revisions: 3
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies