Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to save TileTreeReference ? #7834

Open
edemiaochu opened this issue Mar 13, 2025 · 4 comments
Open

How to save TileTreeReference ? #7834

edemiaochu opened this issue Mar 13, 2025 · 4 comments

Comments

@edemiaochu
Copy link

Hi! How can the reference information added using the TileTreeReference and TiledGraphicsProvider classes, along with vp.addTiledGraphicsProvider(provider), be saved to a file so that it can be directly referenced the next time the file is opened? Does itwinjs-core provide related functionality?

@pmconne
Copy link
Member

pmconne commented Mar 13, 2025

It sounds like you have written your own app that adds custom tile trees to a view. If so, it would be the responsibility of your app to save and restore that information.

@edemiaochu
Copy link
Author

It sounds like you have written your own app that adds custom tile trees to a view. If so, it would be the responsibility of your app to save and restore that information.

Thank you very much ! By the way, will iTwin-core provide related interfaces in the future to support viewport.addTiledGraphicsProvider(provider), allowing the added TileTreeReference information to be saved to a file so that external file can be directly referenced when opening the file next time?

@pmconne
Copy link
Member

pmconne commented Mar 14, 2025

What specifically are you using TiledGraphicsProvider for? To view multiple iModels together in a single viewport, perhaps?

@edemiaochu
Copy link
Author

Yes. Sometimes, I want to reference the model from another iModel as a whole in the current file. This makes it easier to manage different models. Alternatively, when generating drawings, I want to reference a file that contains a drawing frame into the current file. I can copy multiple instances, and when I remove the reference, all the frames will be removed uniformly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants