The FmsStationGroup object contains the following methods:
Retrieves the properties of the Node with the specified ID.
GetNodeProperties(NodeId As Integer, BeginActive As Variant, EndActive As Variant, RunOrdinal As Variant, PriorityOnRun As Variant, IsBaseRun As Variant, PercentOfBaseRun As Variant, Contribution As Variant) As Boolean
| Parameter | Type | Required | Description |
|---|---|---|---|
|
NodeId |
Integer |
Yes |
The ID of the Node for which to retrieve properties. |
|
BeginActive |
Variant |
Yes |
The beginning active date of the Node. This parameter is a return variable of the method. |
|
EndActive |
Variant |
Yes |
The ending active date of the Node. This parameter is a return variable of the method. |
|
RunOrdinal |
Variant |
Yes |
The run ordinal of the Node. This parameter is a return variable of the method. |
|
PriorityOnRun |
Variant |
Yes |
The run priority of the Node. This parameter is a return variable of the method. |
|
IsBaseRun |
Variant |
Yes |
True if the Node is the base run. This parameter is a return variable of the method. |
|
PercentOfBaseRun |
Variant |
Yes |
The Node’s expected flow as a percentage of the base run, if the Node is not the base run. This parameter is a return variable of the method. |
|
Contribution |
Variant |
Yes |
The contribution type of the Node. This parameter will be one of the following values:
This parameter is a return variable of the method. |
Return Value: False if a Node with the specified ID does not exist in the group, otherwise True.
Example
The following example sets a Node in a newly-created group and displays the Node’s properties in a series of message boxes.
|
Sub
Dim FmsGroup Set FmsGroup = CreateObject("CxFms.FmsStationGroup")
FmsGroup.SetNode CDate("May 12, 2011"), 0, 5, 1, 2, False, 40.5, 1
Dim vBeginActiveDate, vEndActiveDate, vRunOrdinal, vPriorityOnRun, _vIsBaseRun, vPercentOfBaseRun, vContribution FmsGroup.GetNodeProperties 5, vBeginActiveDate, vEndActiveDate, _vRunOrdinal, vPriorityOnRun, vIsBaseRun, vPercentOfBaseRun, _vContribution
vBeginActiveDate = CDate(vBeginActiveDate) vEndActiveDate = CDate(vEndActiveDate)
MsgBox vBeginActiveDate MsgBox vEndActiveDate MsgBox vRunOrdinal MsgBox vPriorityOnRun MsgBox vIsBaseRun MsgBox vPercentOfBaseRun MsgBox vContribution
End Sub |
Removes the Node with the specified ID.
RemoveNode(BeginActive As Date, EndActive As Date, NodeId As Long)
| Parameter | Type | Required | Description |
|---|---|---|---|
|
BeginActive |
Date |
Yes |
The beginning active date of the Node. This parameter is a return variable of the method. |
|
EndActive |
Date |
Yes |
The ending active date of the Node. This parameter is a return variable of the method. |
|
NodeId |
Long |
Yes |
The ID of the Node for which to retrieve properties. |
Adds the Node with the specified ID to the group.
SetNode(BeginActive As Date, EndActive As Date, NodeId As Long, RunOrdinal As Integer, PriorityOnRun As Integer, IsBaseRun As Boolean, PercentOfBaseRun As Double, Contribution As Integer)
SetNode(BeginActive As Date, EndActive As Date, NodeId As Long)
| Parameter | Type | Required | Description |
|---|---|---|---|
|
BeginActive |
Date |
Yes |
The beginning date for which the Node will be active in the group |
|
EndActive |
Date |
Yes |
The ending date for which the Node will be active in the group |
|
NodeId |
Long |
Yes |
The ID of the Node to add to the group |
|
RunOrdinal |
Integer |
Yes |
The run ordinal of the Node. This parameter must be greater than zero. |
|
PriorityOnRun |
Integer |
Yes |
The run priority of the Node |
|
IsBaseRun |
Boolean |
Yes |
Set this parameter to 1 - True if the Node is the base run. Possible values are as follows.
Default value is 0 - False |
|
PercentOfBaseRun |
Double |
Yes |
If IsBaseRun = True, this parameter is ignored. If IsBaseRun = False, sets the Node’s expected flow as a percentage of the base run. This parameter value must be between 0 and 100, with up to 7 significant digits. |
|
Contribution |
Integer |
Yes |
The contribution type of the Node. Possible values are as follows.
|
This method will fail if a Node with the specified ID does not exist in the FMS.
If the specified Node has already been added to the group, it will be removed and then added again with the current parameters.
Example
The following example creates a station group containing a single Node.
|
Sub Dim FmsStationGroup Set FmsStationGroup = CreateObject("CxFms.FmsStationGroup")
FmsStationGroup.BeginActiveDate = CDate("May 10, 2011") FmsStationGroup.EndActiveDate = 0 'Indefinite end time FmsStationGroup.Name = "New_Station_Group" FmsStationGroup.Description = "My new station group" FmsStationGroup.StationContribution = 0 'Receipt FmsStationGroup.SetNode CDate("May 10, 2011"), 0, 9, 1, 2, False, 40.5, 0
FmsStationGroup.StationTimezoneKey = 8 FmsStationGroup.StationTimezoneDst = 0
FmsClient.CreateStationGroup(FmsStationGroup) End Sub |
Updates the Node with the specified ID in the group.
UpdateNode(NodeId As Long, BeginActive As Date, bUpdateBeginActive As Long, EndActive As Date, bUpdateEndActive As Long, Parameters As String)
UpdateNode(NodeId As Long, BeginActive As Date, bUpdateBeginActive As Long, EndActive As Date, bUpdateEndActive As Long)
| Parameter | Type | Required | Description |
|---|---|---|---|
|
NodeId |
Long |
Yes |
The ID of the Node to update |
|
BeginActive |
Date |
Yes |
The beginning date for which the Node will be active in the group |
|
bUpdateBeginActive |
Boolean |
Yes |
Sets whether or not to override the BeginActive date and use the default begin date instead of the BeginActive value. Possible values are as follows.
Default value is 0 - False (do not override; use the BeginActive date) |
|
EndActive |
Date |
Yes |
The ending date for which the Node will be active in the group |
|
bUpdateEndActive |
Boolean |
Yes |
Sets whether or not to override the EndActive date and use the default end date instead of the EndActive value. Possible values are as follows.
Default value is 0 - False (do not override; use the EndActive date) |
|
Parameters |
String |
Yes |
"<Key>=<value>" as a semicolon separated list, containing as many of the following as apply where possible values for <Key> are:
and possible values for <value> are:
Example FmsVStationGroup.UpdateNode NodeId, 0,0,0, "RunOrdinal=1; Contribution=1" |