GetDesignStateResource
Node Action:
Gets the Design State Resource (DSR) for a given assignment.
Parameters:
se_type
GetDesignStateResource
se_type = GetDesignStateResourcese_assignmentId
The assignment ID to find the design to export.
se_determineAssignmentId
A lambda to determine the assignment ID.
se_resultVarialbe
The variable name to store the DSR JSON object.
Example:
Count of Components: The following workflow allows you to get the count of components in a design.
digraph workflow {
entry[
se_type0 = DesignToolTrigger,
se_deferUntilOnline0 = false,
se_displayName0 = "Count of Components"
se_iconUrl0 = ""
se_requiresConnection0 = false,
se_visibilityCondition0 = "function (dynamicStateMachineContext, msLogger) {
return false;
}",
se_type1 = MapToolTrigger,
se_displayName1 = "Count of Components"
se_iconUrl1 = "https://arcfmazuredev.blob.core.windows.net/img/CompleteDesign.png",
se_requiresInternet1 = false,
se_applicableToElectric1 = true,
se_applicableToGas1 = true,
se_sortOrder1 = 0
se_type2 = GetDesignStateResource,
se_determineAssignmentId2 = "function (ctx, msLogger) {
return `${ctx.Event.assignment.id}`;
}",
se_resultVariable2 = Dsr
]
displayNumberOfComponents[
label = "Display Component Number",
se_type1 = PromptUser,
se_cardTemplate1 = "{
\"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",
\"type\": \"AdaptiveCard\",
\"version\": \"1.3\",
\"body\": [
{
\"type\": \"TextBlock\",
\"text\": \"Number of Components in design ${NumComponents}.\"
},
{
\"type\": \"ActionSet\",
\"actions\": [
{
\"type\": \"Action.Submit\",
\"title\": \"Ok\"
}
]
}
]
}",
se_determineCardData1 = "function (ctx, log) {
var obj = {
NumComponents: ctx.State.Dsr.components.length
};
return obj;
}";
]
entry->displayNumberOfComponents
}