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

Glossary Item Box

Description

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.

Object Model

OptimizePath ObjectCommand ObjectPartProgram ObjectPointData ObjectCommand Object

Example

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

See Also

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