[CONNECT C++] How do I highlight a component of a cell like Element Information does?

When I use Element Information (or Analyze Element), I can see each component of a cell highlighted as I select each component.

I can't figure out how to do this reliably programmatically.

In MicroStation 2004 I could use mdlElmdscr_display() with the component and it worked nicely.

In MicroStation XM through to Connect, I get the elementRef of the component and use mdlLocate_hiliteElement(). However much of the time this doesn't work. It either doesn't highlight at all, highlights the whole cell, or it highlights the component and then partially other components as well. It seems it isn't a reliable method to show just the one component.

I've tried using the old MS2004 way, as well as mdlElement_display() and a couple of other methods. I've also messed around with Transient Elements, but this seems to cause its own problems.

What is the correct way to handle this simple task? It seems like complex components aren't supported properly by the mdlLocate_hiliteElement() function.

Cheers.

Parents Reply
  • class DisplayPath or mdlDisplayPath_hilite() could be useful here

    Right, you should be able to use mdlDisplayPath_hilite for this.

    Construct a display path using the component element ref using mdlDisplayPath_new. The parent elements should be pushed onto the path automatically, and the cursor index should be set to the component.

    mdlDisplayPath_hilte sets the path hilite state to show the component element.

    -B

    mdlLocate_hiliteElement should work too...it just calls mdlDisplayPath_hilite...



Children
No Data