[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
  • Hi Piers,

    I've also tried using ElementAgenda and once again it highlights the whole cell and not the component.

    Thanks for your, despite of "negative", confirmation. For me it's quite important information, because I have also couple of tools where the same functionality exists and some from them are planned to be migrated on CE platform too.

    It just seems to be a limitation in all of the public API's

    I hope or will help. I'd like to see it will not end in API description, but in "how to highlight element best practice" that can be step by step extended for different scenarios both in terms of context (element location, where it's automatic, or explicitly like in the discussed case), element location (active model, reference) and element complexity (simple element, the whole complex element, one element from complex element...). It's what I am missing in API documentation more than lenghty description of particular classes and methods ... but it's for another discussion ;-)

    With regards,

      Jan

Children
No Data