This read-only property returns the ToolkitParent command object it it exists. If it doesn't, it returns null.
Visual Basic |
---|
Public Property ToolkitParentCommand As Command |
Command object.
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 |