The FmsGeneralGroup 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) As Boolean
| Parameter | Type | Required | Description |
|---|---|---|---|
|
NodeId |
Integer |
Yes |
The Node ID of the Node for which to retrieve properties. |
|
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. |
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.FmsGeneralGroup")
FmsGroup.SetNode CDate("May 12, 2011"), 0, 5
Dim vBeginActiveDate, vEndActiveDate FmsGroup.GetNodeProperties 5, vBeginActiveDate, vEndActiveDate
vBeginActiveDate = CDate(vBeginActiveDate) vEndActiveDate = CDate(vEndActiveDate)
MsgBox vBeginActiveDate MsgBox vEndActiveDate
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)
| 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. |
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 general group containing a single Node.
|
Sub Dim FmsGeneralGroup Set FmsGeneralGroup = CreateObject("CxFms.FmsGeneralGroup")
FmsGeneralGroup.BeginActiveDate = CDate("May 10, 2011") FmsGeneralGroup.EndActiveDate = 0 'Indefinite end time FmsGeneralGroup.Name = "New_General_Group" FmsGeneralGroup.Description = "My new general group" FmsGeneralGroup.SetNode CDate("May 10, 2011"), 0, 5
FmsClient.CreateGeneralGroup(FmsGeneralGroup) 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)
| Parameter | Type | Required | Description |
|---|---|---|---|
|
NodeId |
Long |
Yes |
The ID of the Node to add to the group. |
|
BeginActive |
Date |
Yes |
The beginning date for which the Node will be active in the group. |
|
bUpdateBeginActive |
Long |
Yes |
|
|
EndActive |
Date |
Yes |
The ending date for which the Node will be active in the group. |
|
bUpdateEndActive |
Long |
Yes |