Your Products have been synced, click here to refresh
Sub Main() Dim PCDApp, PCDPartPrograms, PCDPartProgram, PCDCommands, PCDCommand As Object Dim Partnumber, Partname, Supplier, Count%, ECount%, TextLine, EmpList$ ( ), EmpNum% ( ), MachName$ ( ), MachNum% ( ), last$ Dim strPrgName$, strNewName$, strNoExt$, strPath$, FindDot Set PCDApp = CreateObject("PCDLRN.Application") Set PCDPartPrograms = PCDApp.PartPrograms Set PCDPartProgram = PCDApp.ActivePartProgram Set PCDCommands = PCDPartProgram.Commands For Each PCDCommand In PCDCommands If PCDCommand.Type = ASSIGNMENT Then If PCDCommand.GetText(DEST_EXPR,0) = "SRN" Then blr = PCDCommand.GetText(SRC_EXPR,0) bll = Len(blr) Sam = Mid(blr,2,bll-2) PCDCommand.ReDraw End If End If Next PCDCommand ' Read In the list of employess With clock numbers Let Count = "1" Open "S:\CNC Programs\Unedited From Office\Doug\CMM Programs\EmployeeList.txt" For Input As #1 Do While Not EOF(1) Line Input #1, Textline Count = Count + 1 Loop Close #1 ReDim EmpList$ (Count) ReDim EmpNum% (Count) Let ECount = "0" ' Separate out the clock number And Employee And Put them In re-dimensioned arrays Open "S:\CNC Programs\Unedited From Office\Doug\CMM Programs\EmployeeList.txt" For Input As #1 Do While Not EOF(1) Line Input #1, Textline EmpNum (ECount) = Left(Textline, 3) EmpList (ECount) = Right(Textline, Len(Textline)-3) ECount = ECount + 1 Loop Close #1 ' Read In a list of machines With numbers Let Count = "1" Open "S:\CNC Programs\Unedited From Office\Doug\CMM Programs\MachineList.txt" For Input As #1 Do While Not EOF(1) Line Input #1, Textline Count = Count + 1 Loop Close #1 ReDim MachName$(Count) ReDim MachNum%(Count) ' Separate machine And number into their own arrays Let ECount = "0" Open "S:\CNC Programs\Unedited From Office\Doug\CMM Programs\MachineList.txt" For Input As #1 Do While Not EOF(1) Line Input #1, Textline MachNum (ECount) = Left(Textline, 3) MachName(ECount) = Right(Textline, Len(Textline)-3) ECount = ECount + 1 Loop ' a list of inspectors Dim NameList$ (3) NameList (0) = "None" NameList (1) = "Doug" NameList (2) = "Andréa" NameList (3) = "John" ' And their employee numbers Dim MyList$ (3) MyList (0) = " 0 " MyList (1) = " 205 " MyList (2) = " 320 " MyList (3) = " 333 " ' Code for dialog box starts here ...
Sub Main() Dim PCDApp, PCDPartPrograms, PCDPartProgram, PCDCommands, PCDCommand As Object Dim Partnumber, Partname, Supplier, Count%, ECount%, TextLine, EmpList$ ( ), EmpNum% ( ), MachName$ ( ), MachNum% ( ), last$ Dim strPrgName$, strNewName$, strNoExt$, strPath$, FindDot Set PCDApp = CreateObject("PCDLRN.Application") Set PCDPartPrograms = PCDApp.PartPrograms Set PCDPartProgram = PCDApp.ActivePartProgram Set PCDCommands = PCDPartProgram.Commands For Each PCDCommand In PCDCommands If PCDCommand.Type = ASSIGNMENT Then If PCDCommand.GetText(DEST_EXPR,0) = "SRN" Then blr = PCDCommand.GetText(SRC_EXPR,0) bll = Len(blr) Sam = Mid(blr,2,bll-2) PCDCommand.ReDraw End If End If Next PCDCommand ' Read In the list of employess With clock numbers Let Count = "1" Open "S:\CNC Programs\Unedited From Office\Doug\CMM Programs\EmployeeList.txt" For Input As #1 Do While Not EOF(1) Line Input #1, Textline Count = Count + 1 Loop Close #1 ReDim EmpList$ (Count) ReDim EmpNum% (Count) Let ECount = "0" ' Separate out the clock number And Employee And Put them In re-dimensioned arrays Open "S:\CNC Programs\Unedited From Office\Doug\CMM Programs\EmployeeList.txt" For Input As #1 Do While Not EOF(1) Line Input #1, Textline EmpNum (ECount) = Left(Textline, 3) EmpList (ECount) = Right(Textline, Len(Textline)-3) ECount = ECount + 1 Loop Close #1 ' Read In a list of machines With numbers Let Count = "1" Open "S:\CNC Programs\Unedited From Office\Doug\CMM Programs\MachineList.txt" For Input As #1 Do While Not EOF(1) Line Input #1, Textline Count = Count + 1 Loop Close #1 ReDim MachName$(Count) ReDim MachNum%(Count) ' Separate machine And number into their own arrays Let ECount = "0" Open "S:\CNC Programs\Unedited From Office\Doug\CMM Programs\MachineList.txt" For Input As #1 Do While Not EOF(1) Line Input #1, Textline MachNum (ECount) = Left(Textline, 3) MachName(ECount) = Right(Textline, Len(Textline)-3) ECount = ECount + 1 Loop ' a list of inspectors Dim NameList$ (3) NameList (0) = "None" NameList (1) = "Doug" NameList (2) = "Andréa" NameList (3) = "John" ' And their employee numbers Dim MyList$ (3) MyList (0) = " 0 " MyList (1) = " 205 " MyList (2) = " 320 " MyList (3) = " 333 " ' Code for dialog box starts here ...
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |