Sequence Detail Control methods
The
Sequence Detail Control
has these methods that can be used by a client in runtime.Method | Description |
---|---|
navNextStep | This method causes the control to select the ‘Next’ sequence step in the loaded sequence and scroll to make the step visible. If no step is selected in the chart when this method is invoked, then the ‘next’ step is the first step of the sequence. |
navPriorStep | This method causes the control to select the ‘Prior’ sequence step in the loaded sequence and scroll to make the step visible. If no step is selected in the chart when this method is invoked, then the ‘prior’ step is the final step of the sequence. |
navNextActiveStep | This method causes the control to select the ‘Next’ active sequence step in the loaded sequence and scroll to make the step visible. If no steps are active, then any selected chart element is deselected, and no other effect occurs. If no step is selected in the chart, then the ‘next’ step is the first active step in the chart. |
navPriorActiveStep | This method causes the control to select the ‘Prior' active sequence step in the loaded sequence and scroll to make the step visible. If no steps are active, then any selected chart element is deselected, and no other effect occurs. If no step is selected in the chart, then the ‘prior' step is the last active step in the chart. |
navNextFailedStep | This method causes the control to select the ‘Next’ failed sequence step in the loaded sequence and scroll to make the step visible. If no steps are failed, then any selected chart element is deselected, and no other effect occurs. If no step is selected in the chart, then the ‘next’ step is the first failed step in the chart. |
navPriorFailedStep | This method causes the control to select the ‘Priors' failed sequence step in the loaded sequence and scroll to make the step visible. If no steps are failed, then any selected chart element is deselected, and no other effect occurs. If no step is selected in the chart, then the ‘prior' step is the last failed step in the chart. |
Next and previous step navigation VBA scripting
Next and Previous Step Navigation functionality can be implemented by adding two buttons to the FactoryTalk View SE display. The Next button would have a Released event handler configured in the VBA code that calls the Sequence Detail Control’s navNextStepMethod.
An example of this VBA code follows:
Private Sub Button62_Released()
SeqMgrDetailControl1.navNextStep
End Sub
Similarly, the Prior button would have a Released event handler configured in the VBA code that calls the Sequence Detail Control’s navPriorStepMethod. An example of this VBA code could appear as follows:
Private Sub Button61_Released()
SeqMgrDetailControl1.navPriorStep
End Sub
Next and previous active step navigation VBA scripting
VBA logic to provide Next and Previous active step functionality is recommended to be more complex to enable and disable the Prior and Next buttons based on whether there are active steps in the loaded
Equipment Sequence
. The ‘Release’ event handlers on the Prior and Next buttons is coded to invoke the navPriorActiveStep/navNextActiveStep method, as shown in the following example:
Private Sub Button59_Released()
SeqMgrDetailControl1.navNextActiveStep
End Sub
Private Sub Button60_Released()
SeqMgrDetailControl1.navPriorActiveStep
End Sub
To control the enabling and disabling of the Prior and Next active step buttons, run initialization logic when the screen loads. The following code is an example of using the Display’s AnimationStart event to provide this functionality:
Private Sub Display_AnimationStart()
If (SeqMgrDetailControl1.ActiveStepsCount > 0) Then
Button59.Enabled = True
Button60.Enabled = True
Else
Button59.Enabled = False
Button60.Enabled = False
End If
End Sub
The final piece of logic for controlling the enabling and disabling of the Prior and Next active step buttons is VBA code configured to handle the ActiveStepCountChanged event. The following code is an example implementation:
Private Sub SeqMgrDetailControl1_ActiveStepCountChanged(ByVal p0 As Long)
If (p0 > 0) Then
Button59.Enabled = True
Button60.Enabled = True
Else
Button59.Enabled = False
Button60.Enabled = False
End If
End Sub
Next and previous failed step navigation VBA scripting
VBA logic to provide Next and Previous failed step functionality is implemented identically to the active step example, but using the Failed versions of the Sequence Detail Control's methods, properties, and events.
Provide Feedback