PC-DMIS 2019 R2 Object Library
ToolkitParentCommand Property
See Also  Example  Send Topic Feedback | See Object Hierarchy Chart
PCDLRN ActiveX DLL > Command Object : ToolkitParentCommand Property

Glossary Item Box

Description

This read-only property returns the ToolkitParent command object it it exists. If it doesn't, it returns null.

Syntax

Visual Basic
Public Property ToolkitParentCommand As Command

Return Type

Command object.

Example

This code looks at the current command. If the current command is a dimension command, it finds the referenced feature. It then returns the parent toolkit command for that feature if one exists.
Example (VB.NET)Copy Code
Dim cmd As PCDLRN.Command;

If cmd IsNot Nothing AndAlso cmd.IsDimension Then
	Dim DimCommand As PCDLRN.DimensionCmd = cmd.DimensionCommand
	Dim cmdFeature As PCDLRN.Command = DimCommand.GetReferencedFeature(1)
	If cmdFeature IsNot Nothing Then
		Dim ToolKitCommand As PCDLRN.Command = cmdFeature.ToolkitParentCommand
		If ToolKitCommand IsNot Nothing Then
			'...
			MessageBox.Show(ToolKitCommand.ID)
			'...
		End If
	End If
End If

See Also

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