Collapse All Expand All

PC-DMIS 2019 R1 Object Library |
HighlightElement Method
See Also Send Topic Feedback | See Object Hierarchy Chart

Name

  Required case-sensitive String that indicates the CAD element to highlight.

All
  Boolean value that indicates whether or not all CAD elements of that have Name should be highlighted. If set to TRUE then all elements with Name are selected. If set to FALSE, then only the first item in the list that has Name is selected.

PCDLRN ActiveX DLL > CadModel Object : HighlightElement Method

Glossary Item Box

# Description

This method highlights the specified CAD element (or elements) on the CAD model in the Graphics Display window.

# Syntax

Visual Basic
    Public Function HighlightElement( _
       ByVal Name As String, _
       ByVal All As Boolean _
    ) As Boolean

# Parameters

Name

  Required case-sensitive String that indicates the CAD element to highlight.

All
  Boolean value that indicates whether or not all CAD elements of that have Name should be highlighted. If set to TRUE then all elements with Name are selected. If set to FALSE, then only the first item in the list that has Name is selected.

# Return Type

Boolean value. Boolean returns true if the function succeeds in highlighting the specified CAD element, false if it fails.

# Remarks

# Example

| Copy Code
--- | ---
    ' Sample Code:
    Dim App As PCDLRN.Application
    Set App = CreateObject("PCDLRN.Application")
    Dim Parts As PCDLRN.PartPrograms
    Set Parts = App.PartPrograms
    Dim Part As PCDLRN.PartProgram
    Set Part = App.ActivePartProgram
    Dim CADMod As PCDLRN.CadModel
    Set CADMod = Part.CadModel
    Dim strElement As String
    Dim boolYesNo As Boolean
    strElement = InputBox("Type the CAD element to highlight", "Highlight CAD")
    boolYesNo = MsgBox("Select all?", vbYesNo, "Select All")
    If CADMod.HighlightElement(strElement, boolYesNo) = False Then
        MsgBox "Element: " & strElement & " couldn't be highlighted", vbCritical, "No CAD Highlighted"
        Else
            MsgBox "Success. Element: " & strElement & " was highlighted", vbOKOnly, "CAD Highlighted"
    End If

# See Also

CadModel Object | CadModel Members

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