The OptimizePath object contains the functions to perform path optimizations on measurement routines. You can return a pointer to this object by using the OptimizePath property in the PartProgram object.
Creates an OptimizePath object called Optimizer and then runs the optimizer to optimize the path the probe travels during execution.
Example (C#) | Copy Code |
---|---|
Dim DmisApp As Object
Dim DmisPart As Object
Dim EditWindow As Object
Dim Optimizer As Object
Sub Main
Set DmisApp = CreateObject("PCDLRN.Application")
Set DmisPart = DmisApp.ActivePartProgram
Set EditWindow = DmisPart.EditWindow
Set Optimizer = DmisPart.OptimizePath
If Not Optimizer Is Nothing Then
Optimizer.SortAllFeatures True
Optimizer.CreateOptimizePath
Set Optimizer = Nothing
End If
Set EditWindow = Nothing
Set DmisPart = Nothing
Set DmisApp = Nothing
End Sub |