PC-DMIS 2022.1 Object Library
Strategies Object
See Also  Members  Example  Send Topic Feedback | See Object Hierarchy Chart
PCDLRN ActiveX DLL : Strategies Object

Glossary Item Box

Description

This Strategies object contains a collection of the PC-DMIS measurement strategies.

You can access the Strategies object through the strategies property in the Command object.

Object Model

Strategies ObjectApplication ObjectStrategy ObjectStrategy ObjectCommand Object

Example

Example (Visual Basic)Copy Code
Private Sub SearchStrategiesForEachCommand_Click()
Dim strategy As PCDLRN.strategy
Dim index As Integer
FoundStrategyList.Clear
If cmds Is Nothing Then Exit Sub
Set cmd = cmds.Item(FeatureID.Text)
If cmd Is Nothing Then Exit Sub
Set strategies = cmd.strategies
If strategies Is Nothing Then Exit Sub
FoundStrategyNumber.Text = CStr(strategies.Count)
CurStrategyName.Text = strategies.CurrentStrategy.Name
CurStrategyInternalIndex.Text = Str(strategies.CurrentStrategy.index)

index = 0
For Each strategy In strategies
    FoundStrategyList.AddItem (strategy.Name + ": Index=" + Str(index) + "; Internal Index=" + Str(strategy.index))
    If strategy.IsDefaultStrategy Then
        DefStrategyName.Text = strategy.Name
        DefStrategyIndex.Text = Str(index)
        DefStrategyInternalIndex.Text = Str(strategy.index)
    End If
    If strategy.Name = CurStrategyName.Text Then
        CurStrategyIndex.Text = Str(index)
    End If
    index = index + 1
Next
 
End Sub

See Also

Copyright © 2022. Hexagon Manufacturing Intelligence – Metrology Software, Inc. All Rights Reserved.