[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
  • What is the correct way to handle this simple task?

    While the solution in the thread Jan linked is useful, it doesn't exactly answer your question... 

    • How do I highlight/unhighlight an individual element?
    • How do I highlight/unhighlight an individual component of a complex element?

    The ElementAgenda.Hilight/ElementAgenda.ClearHilight is useful for multiple elements.  Though I suppose you could populate an ElementAgenda with a single element and use those methods.

     
    Regards, Jon Summers
    LA Solutions

Reply
  • What is the correct way to handle this simple task?

    While the solution in the thread Jan linked is useful, it doesn't exactly answer your question... 

    • How do I highlight/unhighlight an individual element?
    • How do I highlight/unhighlight an individual component of a complex element?

    The ElementAgenda.Hilight/ElementAgenda.ClearHilight is useful for multiple elements.  Though I suppose you could populate an ElementAgenda with a single element and use those methods.

     
    Regards, Jon Summers
    LA Solutions

Children