hexagon logo

How to use the PCDMIS2016 HighlightFeature?

How to use the PCDMIS2016 - PartProgram HighlightFeature?


PCDLRN.Application pcdapp =new PCDLRN.Application();
            PCDLRN.PartProgram pcdpart = pcdapp.ActivePartProgram;;
            pcdpart.HighlightFeature("PNT1" ,true ,true );
            pcdpart.RefreshPart();

PCDMIS2016 PNT1 inside is not responding.
Parents
  • ' 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 Highlight"
    
    End If
    


    This is from 2010 version, so I hope it works...
Reply
  • ' 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 Highlight"
    
    End If
    


    This is from 2010 version, so I hope it works...
Children