[CONNECT C++] ElementAgenda Hilight/Clear Hilight

My command successfully interrogates elements.  It gathers an ElementAgenda and then ElementAgenda::Hilite to show user the elements that matched some criteria.

AreaAnnotator Search dialog

When the ElementAgenda is destroyed the elements remain hilighted in MicroStation's views.  If user wants to interrogate elements using new criteria, I want to remove the highlights from the elements selected by an earlier query. But at that point the ElementAgenda holding the highlighted elements is history: it has been destroyed. 

Is there a quick way to find existing hilighted elements and clear their highlight state, either...

  • As a user?
  • Programmatically?
Parents
  • Is there a quick way to find existing hilighted elements and clear their highlight state, either...

    No, if you don't keep the agenda around there's nothing else that's keeping a list of which elementRefs have their hilite state set.

    Would it make sense for your tool to make the result the current selection set?

    -B



  • Brien Bastings said:
    if you don't keep the agenda around there's nothing else that's keeping a list of which elementRefs have their hilite state set

    Too bad!

    Brien Bastings said:
    Would it make sense for your tool to make the result the current selection set?

    The tool ElementAgenda may be a filtered version of an existing Fence contents or Selection Set.  I feel that it would confuse the user if a new Selection Set were to appear. 

    I could make the ElementAgenda global, but that seems an unfortunate overhead for a single tool that's part of a much bigger app.

     
    Regards, Jon Summers
    LA Solutions

  • Hi,

    I am confused. 

    I can not find ElementAgenda.ClearHilite()  function.

    But there is ElementAgendaDisplayable.ClearHilite()

    So, if ElementAgenda is distroyed there still exists ElementAgendaDisplayable

    However, this does not solve the problem.

    Lets say, user selects some elements. I start my addin and want to search reModel for any selected elements.

    It has to be a way to do that.

    Maybe, using  SelectionSetManager. BuildAgenda(ref Bentley.DgnPlatformNET.ElementAgenda agenda)

    Not sure.

    regards

    Nenad

  • I can not find ElementAgenda.ClearHilite()

    The MicroStationAPI help is not always easy to use.  My preferred approach is to use the Search pane and click on the xxx Struct item (in this case, the ElementAgenda Struct Reference)...

    I start my addin and want to search reModel for any selected elements

    That is solved by the SelectionSet Manager or by ElementAgenda::BuildFromElementSet.

    However, that's not my problem.  When you use ElementAgenda::Hilight the highlighted elements are not added to a Selection Set.  They belong to the ElementAgenda.  But, when the ElementAgenda is destroyed, the highlights remain.  Since the highlighted elements are not members of a Selection Set, there's no way to retrieve them.

     
    Regards, Jon Summers
    LA Solutions

Reply
  • I can not find ElementAgenda.ClearHilite()

    The MicroStationAPI help is not always easy to use.  My preferred approach is to use the Search pane and click on the xxx Struct item (in this case, the ElementAgenda Struct Reference)...

    I start my addin and want to search reModel for any selected elements

    That is solved by the SelectionSet Manager or by ElementAgenda::BuildFromElementSet.

    However, that's not my problem.  When you use ElementAgenda::Hilight the highlighted elements are not added to a Selection Set.  They belong to the ElementAgenda.  But, when the ElementAgenda is destroyed, the highlights remain.  Since the highlighted elements are not members of a Selection Set, there's no way to retrieve them.

     
    Regards, Jon Summers
    LA Solutions

Children
No Data