hexagon logo

Tracefields and Scripts

Anyone out there know how to retrieve a Tracefield Value from a part program in a script? Can't quite find the right command...
Parents
  • this works for me using Pcdmis Basic Scripting version 2013:

    Dim DmisApp As Object
    Dim DmisPart As Object
    Dim Commands As Object
    Dim Command As Object
    Dim TraceCommand As Object
    
    Sub Main
    
      Set DmisApp = CreateObject("PCDLRN.Application")
      Set DmisPart = DmisApp.ActivePartProgram
      Set Commands = DmisPart.Commands
    
      For Each Command In Commands 
       If Command.IsTraceField Then
          Set TraceCommand = Command.TraceFieldCommand
          MsgBox TraceCommand.Name + " " + TraceCommand.Value
          Set TraceCommand = Nothing
       End If
      Next Command 
    
    Set Commands = Nothing
    Set DmisPart = Nothing
    Set DmisApp = Nothing
      
    End Sub
Reply
  • this works for me using Pcdmis Basic Scripting version 2013:

    Dim DmisApp As Object
    Dim DmisPart As Object
    Dim Commands As Object
    Dim Command As Object
    Dim TraceCommand As Object
    
    Sub Main
    
      Set DmisApp = CreateObject("PCDLRN.Application")
      Set DmisPart = DmisApp.ActivePartProgram
      Set Commands = DmisPart.Commands
    
      For Each Command In Commands 
       If Command.IsTraceField Then
          Set TraceCommand = Command.TraceFieldCommand
          MsgBox TraceCommand.Name + " " + TraceCommand.Value
          Set TraceCommand = Nothing
       End If
      Next Command 
    
    Set Commands = Nothing
    Set DmisPart = Nothing
    Set DmisApp = Nothing
      
    End Sub
Children
No Data