Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
Bentley 中国优先社区
  • Welcome to Bentley Communities
  • Bentley's Communities
  • Bentley 中国优先社区
  • Cancel
Bentley 中国优先社区
技术资料库 14-BIS数据结构
    • Sign In
    Bentley 中国优先社区 requires membership for participation - click to join
    • +Bentley 中文技术资料库
    • -iTwin 数字孪生平台
      • Connector(原名Bridge)
      • i-twin微信小课堂
      • -iModel.js
        • +01-iModel.js资源
        • -02-iModel.js初步
          • 01-开始使用iModel.js
          • 02-简介
          • 03-为何使用iModel.js
          • 04-iModel上传
          • +05-iModel.js处理CSV文件
          • 06-简单的浏览应用
          • 07-数据显示
          • 08-前端和后端
          • 09-超级URLs
          • 10-iModel项目
          • 11-系统集成应用
          • 12-部署应用
          • 13-与微软IOT集成
          • 14-BIS数据结构
          • 15-快速开始
        • +03-iModel.js专题应用
      • +iTwin工作流程
      • +iTwin技术主题
    • Bentley二次开发资料库
    • +常见问题汇总
    • Bentley-Learn 官方教学平台-使用方法
    • +中国优先社区使用指南
    • +Bentley学习资料库
    • +Bentley用户成功活动精选
    • +服务合作伙伴计划

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

    14-BIS数据结构

    说明:

    原文刊登在Medium.com/imodeljs站点,作者: Roop Saini

    中文翻译:

    正在进行中...

    英文原文:

    “How do I read data from an iModel?”

    The question that has been eluding the community!

    We have lots of new developers joining our ranks. They have been thrilled to see what iModel.js has to offer…yet they all seem to have one common complaint.

    This takes me back to the first time I had to read data from an iModel. My challenge was to implement a feature called cross-probing — this involves clicking on a 3D element, and zooming into its 2D counterpart and vice versa. Here’s a sneak peak:



    Holy smokes! I was new to the job and expected to do that?!

    I had no experience querying data from an iModel. I imagined this would involve writing a complex query that could map all the 3D elements to their related 2D elements, and connect everything in between.

    Here is the tale of how I attempted to slay this dragon.

    First let’s set the stage — if we are going to interact with our iModel, we need to speak its language. That’s where the schema comes in. The schemas of an iModel define how data is stored within it. Each industry in Infrastructure — such as Railway, Building, Manufacturing, Civil, etc — will have its own unique set of schemas. You may think:

    Dang, that’s a lot of schemas.

    Do I have to understand all of them??

    If only there was a common tongue that every iModel could speak —

    Enter BIS

    BIS is the base set of schemas of every iModel. It contains all the basic types of data that any infrastructure project would contain — such as the 2D and 3D elements above. This is where we can begin to discover the contents of any given iModel.

    In the cross-probing case, we have an iModel originally sourced from a Plant design application. But the task is to click on a 3D element and zoom into its 2D counterpart — both of which are BIS based. We may not even have to worry about the Plant schemas!

    There are two main things to focus on when first exploring a schema:

    • What type of elements does it contain?
      => This is the class of an element.
      For example a 3D element is of class GeometricElement3D; 2D element is of class GeometricElement2D.
    • How are they related?
      => This is what we call a relationship between elements.
      How is a 3D element related to a 2D element? This is what we need to figure out to perform the magic of cross-probing.

    Going back to our tale…it took me several espresso fueled hours, but this is the query I ended up with.

    Please don’t freak out :)

    In case your heart just skipped a beat…Congratulations! You have passed the test

    The good news is that I didn’t have to fight this battle alone, and neither will you. Thankfully, we have some really effective tools and documentation that will empower you through the process. Let’s walk through it step-by-step to see how you can make it happen.


    As promised in the clips…here are some links to unleash the data within your Digital Twins:

    iModel Console: Run queries against your iModel.

    ECSQL Tutorial: Learn how to construct your own ECSQL queries.

    Log Element-IDs: Start investigating specific elements.

    Create iModel: To get “Bay Town Process Plant” example used above.

    BIS Docs: Study core BIS concepts.

    ECSQL Join: Learn how to join relationships and elements.


    Finally — once I had cross-probing down — I was able to apply the same core principles to go beyond BIS and write queries against specialized schemas. Hopefully this is enough material for you to get back in there and slay your own dragon.

    • Share
    • History
    • More
    • Cancel
    • shunnai.zhao Created by Bentley Colleague shunnai.zhao
    • When: Mon, Sep 14 2020 2:17 AM
    • shunnai.zhao Last revision by Bentley Colleague shunnai.zhao
    • When: Mon, Sep 14 2020 8:19 AM
    • Revisions: 2
    • Comments: 0
    • Sign in to reply
    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