You are currently reviewing an older revision of this page.
1.必备软件环境:Node.js (latest 10.x or 12.x LTS version)Google ChromeGit
2.为了能够访问iModel数据,需要在如下网站进行注册。https://imodeljs.github.io/iModelJs-docs-output/getting-started/#developer-registrationRegister Yourself , Register Your Application.
注册完之后,会将这2个信息发送至用户登记时所填写的邮箱。
3.通过git clone https://github.com/imodeljs/simple-viewer-app.git 到指定的目录。
然后通过vscode等编辑器打开文件configuration.ts,将2步骤中邮件中收到的client_id填写到
38和41行处。
最后,将邮件收到的
Project name: simple-viewer-app iModel name: simple-viewer-app
填写到文件config.json的第7,第8行处,同时放开注释,如下所示:
然后cd 进project主目录
1>npm install 依赖安装。如果一些依赖安装失败,请通过npm install xxx进行单独安装即可。
2>npm run build 编译。
3>npm run start:servers 启动服务。
4>打开chrome等指定浏览器,输入localhost:3000 即可。
出现Open Sample iModel,然后点击其,请耐心等待,然后出现运行结果如下所示: