ZoomToComponent

Node Action:

The ZoomToComponent node action zooms to a given component on the map.

Parameters:

se_type

ZoomToComponent

se_type = ZoomToComponent

se_componentId

The ID of the component to zoom to.

se_determineComponentId

A lambda to create a 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
}
Feedback
QR Code is a registered trademark of DENSO WAVE INCORPORATED in Japan and other countries.