Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
Bentley 中国优先社区
  • Welcome to Bentley Communities
  • Bentley's Communities
  • Bentley 中国优先社区
  • Cancel
Bentley 中国优先社区
技术资料库 如何运行github上的simple-viewer-app例子代码
    • Sign In
    Bentley 中国优先社区 requires membership for participation - click to join
    • -Bentley 中文技术资料库
      • +AutoPIPE
      • +Bentley Civil
      • +Bentley Navigator
      • +Bentley Substation
      • +BRCM
      • +BridgeMasterModeler/OpenBridgeModeler
      • -i-model / DgnDb
        • DgnDb i-model Importer
        • DgnDb介绍
        • i-model 1.0/1.5 SDK
        • i-model常见问题解答
        • 为何一个DGN文件发布成iModel2.0后体积增大了快100倍?
        • 为何我用Mstn V8iSS4发布的.imodel无法用Navigator CE Update2打开
        • 发布带有图片的i-model
        • 哪里能找到Revit转i-model的插件?
        • 如何利用iTwin平台发布.imodel格式的文件?
        • 如何简单判断i-model的版本
        • 如何运行github上的simple-viewer-app例子代码
        • 将带有文件链接的dgn发布成imodel
        • 我只有MicroStation V8iSS3,如何将DGN发布成移动端用的imodel?
        • +新版imodel
        • 查询i-model的来源
        • 给一个DGN中元素添加EC属性
      • +LumenRT/ContextCapture
      • +MicroStation
      • +MOSES
      • +OpenBuildings Designer
      • +OpenFlows
      • +OpenPlant
      • +OpenPlant Electrical CCK
      • Plaxis 地质分析
      • +ProjectWise
      • +ProStructures
      • +SACS
      • +STAAD.Pro
      • +SYNCHRO Pro
      • +其 它
      • +建筑设计之思考(赵大师专作)
      • +桥梁大师<BridgeMaster>
      • +现浇箱梁
      • +软件激活及授权
    • +iTwin 数字孪生平台
    • Bentley二次开发资料库
    • +常见问题汇总
    • Bentley-Learn 官方教学平台-使用方法
    • +中国优先社区使用指南
    • +Bentley学习资料库
    • +Bentley用户成功活动精选
    • +服务合作伙伴计划

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

    如何运行github上的simple-viewer-app例子代码

    1.必备软件环境:
    Node.js (latest 10.x or 12.x LTS version)
    Google Chrome
    Git

    2.为了能够访问iModel数据,需要在如下网站进行注册(如果没有Bentley User Account,需要先用一个Bentley User Account)。
    https://imodeljs.github.io/iModelJs-docs-output/getting-started/#developer-registration
    Register Yourself , Register Your Application.

    注册完之后,会将这2个信息发送至用户登记时所填写的邮箱。

    3.通过git clone https://github.com/imodeljs/simple-viewer-app.git 到指定的目录。

    将邮件收到的

    Project name: simple-viewer-app
    iModel name: simple-viewer-app

    填写到文件config.json的第7,第8行处,同时放开注释,如下所示:

    然后切换到project主目录

    通过鼠标右键单击Git Bash Here来启动Git,开始输入一下命令:

    1>npm install 依赖安装。如果一些依赖安装失败,请通过npm install xxx进行单独安装即可。

    如:
    npm install typedoc-plugin-internal-external@2.0.1
    npm install @bentley/webpack-tools@1.4.0

    2>npm run build 编译。

    3>npm run start:servers 启动服务。

    4>打开chrome等指定浏览器,输入localhost:3000 即可。

    出现Open Sample iModel,然后点击其,请耐心等待,然后出现运行结果如下所示:

    • imodel
    • Share
    • History
    • More
    • Cancel
    • Devin Liu Created by Devin Liu
    • When: Sun, Nov 24 2019 10:56 PM
    • Devin Liu Last revision by Devin Liu
    • When: Sun, Mar 29 2020 10:11 PM
    • Revisions: 5
    • 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