Skip to content

Ways to hide subcategory in iModel viewer #948

Answered by pmconne
hsanand61564 asked this question in Q&A
Discussion options

You must be logged in to vote

I modified this sample which also uses ViewportComponent to try to reproduce your issue. In onViewOpen callback I query for all subcategories and make half of them invisible. This has the expected effect: geometry on those subcategories is not displayed in the viewport.

    IModelApp.viewManager.onViewOpen.addOnce(async (viewport: ScreenViewport) => {
      this.setState({ viewport });
      await HyperModelingApp.enableHyperModeling(viewport);
      HyperModelingApp.markerHandler.onActiveMarkerChanged.addListener((activeMarker) => this.setState({ activeMarker }));
      await HyperModelingApp.activateMarkerByName(viewport, "Section-Left");

      // Turn half of the subcategories invisib…

Replies: 3 comments 9 replies

Comment options

You must be logged in to vote
6 replies
@pmconne
Comment options

@hsanand61564
Comment options

@pmconne
Comment options

@hsanand61564
Comment options

@hsanand61564
Comment options

Comment options

You must be logged in to vote
1 reply
@pmconne
Comment options

Comment options

You must be logged in to vote
2 replies
@hsanand61564
Comment options

@pmconne
Comment options

Answer selected by pmconne
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants