SelectComponent
Node Action:
The SelectComponent node action selects the component based on ID.
Parameters:
se_type
SelectComponent
se_type = SelectComponentse_componentId
The ID of the component to select.
se_determineComponentId
A lambda to create an component ID.
Example:
Find Nearest Pole: Finds the pole nearest to the selected component, then selects and zooms to it.
digraph workflow {
entry[
se_type0 = ComponentToolTrigger,
se_displayName0 = "Find Nearest Pole"
se_iconService0 = ""
se_iconUrl0 = ""
se_requiresConnection0 = false,
se_sortOrder0 = 0,
se_visibilityCondition0 = "(dynamicStateMachineContext, msLogger) => {
return true;
}",
se_type1 = Action,
se_action1 = "(ctx, msLogger) => {
ctx.State.Coordinate = ctx.Event.component.geometry;
}",
]
FindNearestPole[
se_type0 = NearestWithDistance,
se_componentType0 = "Pole",
se_coordinate0 = Coordinate,
se_maxDistance0 = 100,
se_resultVariable0 = Poles
]
SelectAndZoom[
se_type0 = SelectComponent,
se_determineComponentId0 = "(ctx, msLogger) => {
IEnumerable<dynamic> poles = ctx.State.Poles;
var pole = poles.FirstOrDefault();
return pole?.Id.ToString();
}",
se_type1 = ZoomToComponent,
se_componentId1 = ""
se_determineComponentId1 = "(ctx, msLogger) => {
IEnumerable<dynamic> poles = ctx.State.Poles;
var pole = poles.FirstOrDefault();
return pole?.Id.ToString();
}",
]
entry->FindNearestPole->SelectAndZoom->exit
}