Replies: 1 comment
-
I would double check your iModel and Viewer set up. The ImodelApp should be started up before any calls to getSmartDevices is made, normally, that's how the ViewManager and a first initial default view is created. From that created view, a new imodelConnection would be created, and assigned to the default view (which will be the selected view on init). I'd need to know more information about how you are creating your view (if you are explicitly doing that, or letting IModelApp do it for you) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I'm currently working on Introduction to the iTwin Platform course and have encountered an issue with establishing an iModel connection. Despite initializing the iModel application and setting up the necessary components, I'm getting an error stating, "Couldn't connect to iModel". In the IModelDataApi.ts file, when attempting to access the iModel via IModelApp.viewManager.selectedView, the selectedView is undefined. Could this be related to asynchronous initialization timing, or is there something specific I might be missing in the iModel or view setup?
Any insights or advice would be greatly appreciated!
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions