The
DgnElementSetTool class
can be used to implement an element pick or an element modify command.
It simplifies dealing with the common element sources.
Basic tool operation is to populate an ElementAgenda from the active fence, selection sets, or user locate.
The tool's _OnElementModify method will then be called for each entry in the ElementAgenda.
The following sequence of member function calls will occur in the common case where the tool requires a datapoint to identify
the target element and another datapoint to accept the modification (_NeedAcceptPoint -> True) …
_OnPostInstall
_SetupAndPromptForNextAction – empty agenda
_OnDataButton
_LocateOneElement
_DoLocate
_BuildLocateAgenda
_ModifyAgendaEntries
_FilterAgendaEntries
_SetupAndPromptForNextAction – non-empty agenda
_HiliteAgendaEntries
_SetupForModify – dynamics=True
_OnElementModify
_OnDataButton
_ProcessAgenda
_SetupForModify – dynamics=False
_OnElementModify
_OnModifyComplete
_OnReinitialize
_OnDataButton
The following sequence of member function calls will occur in the case where the tool requires a
single datapoint to identify the target element and to accept the modification (_NeedAcceptPoint -> False, _WantDynamics -> False) …
_OnPostInstall
_SetupAndPromptForNextAction – empty agenda
_OnDataButton
_LocateOneElement
_DoLocate
_BuildLocateAgenda
_ModifyAgendaEntries
_FilterAgendaEntries
_SetupAndPromptForNextAction – non-empty agenda
_HiliteAgendaEntries
_ProcessAgenda
_SetupForModify – dynamics=False
_OnElementModify
_OnModifyComplete
_OnReinitialize
DgnElementSetTool uses several enumerations that are defined for C++.
The documentation didn't make it into the Python documentation.
I've
copied them here.
Visit the State Machine examples Download page.
Use MicroStation's Python Manager to find and execute the script.
Post questions about MicroStation programming to the MicroStation Programming Forum.