This method highlights the specified CAD element (or elements) on the CAD model in the Graphics Display window.
- 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.
Boolean value. Boolean returns true if the function succeeds in highlighting the specified CAD element, false if it fails.
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 |