Your Products have been synced, click here to refresh
ASSIGN/VPART="blah_blah" ASSIGN/VREV="1" ASSIGN/VDESCRIPTION="CF34-10A_MILL_AND_MOLD" ASSIGN/VPROGRAMID="PI-0364" ASSIGN/VPROGRAMREV="A" FPTRHARD =FILE/OPEN,D:\CMM_PROGRAMS\PC-DMIS_SUPPORT_FILES\THIS_MACHINES_GLOBAL_SETTINGS\HARDWARE.TXT,READ VLOCALHARDWARE=FILE/READLINE,FPTRHARD,{VHARDWARE} FILE/CLOSE,FPTRHARD,KEEP FPTRSOFT =FILE/OPEN,D:\CMM_PROGRAMS\PC-DMIS_SUPPORT_FILES\THIS_MACHINES_GLOBAL_SETTINGS\SOFTWARE.TXT,READ VLOCALSOFTWARE=FILE/READLINE,FPTRSOFT,{VSOFTWARE} FILE/CLOSE,FPTRSOFT,KEEP CSERIALNUMBER =COMMENT/INPUT,NO,FULL SCREEN=NO, ENTER SERIAL NUMBER (15 CHARACTERS MAX) ASSIGN/VSERIALNUMBER=CSERIALNUMBER.INPUT IF/CSERIALNUMBER.INPUT == 0 ASSIGN/VSERIALNUMBER=" " END_IF/ CCMMOPERATOR =COMMENT/INPUT,NO,FULL SCREEN=NO, ENTER CMM OPERATOR ID ASSIGN/VCMMOPERATOR=CCMMOPERATOR.INPUT IF/CCMMOPERATOR.INPUT == 0 ASSIGN/VCMMOPERATOR=" " END_IF/ CCUSTOM =COMMENT/INPUT,NO,FULL SCREEN=NO, ENTER TOOL ASSIGN/VCUSTOM=CCUSTOM.INPUT IF/CCUSTOM.INPUT == 0 ASSIGN/VCUSTOM=" " END_IF/ CREMARKS =COMMENT/INPUT,NO,FULL SCREEN=NO, ENTER OPTIONAL REMARKS IF DESIRED (30 CHARACTERS MAX) ASSIGN/VREMARKS=CREMARKS.INPUT IF/CREMARKS.INPUT == 0 ASSIGN/VREMARKS=" " END_IF/ TRACEFIELD/NO_DISPLAY,LIMIT=43 ; Part : VPART TRACEFIELD/NO_DISPLAY,LIMIT=7 ; Rev : VREV TRACEFIELD/NO_DISPLAY,LIMIT=43 ; Description : VDESCRIPTION TRACEFIELD/NO_DISPLAY,LIMIT=16 ; Serial Number : VSERIALNUMBER TRACEFIELD/NO_DISPLAY,LIMIT=11 ; Operator : VCMMOPERATOR TRACEFIELD/NO_DISPLAY,LIMIT=16 ; Tool : VCUSTOM TRACEFIELD/NO_DISPLAY,LIMIT=30 ; Remarks : VREMARKS TRACEFIELD/NO_DISPLAY,LIMIT=11 ; Program ID : VPROGRAMID TRACEFIELD/NO_DISPLAY,LIMIT=22 ; Hardware : VHARDWARE TRACEFIELD/NO_DISPLAY,LIMIT=22 ; Software : VSOFTWARE ASSIGN/VDATE=SYSTEMDATE("dd''MMM''yyyy") ASSIGN/VTIME=SYSTEMTIME("hh''mm")
Sub Main 'Declares the File System Object And Instantiates it Dim objFSO Set objFSO = CreateObject("Scripting.FileSystemObject") 'Declares PC-DMIS As the Active Program/Application Dim PCDApp, PCDPartProgram, PCDCommands, PCDCommand, retval Set PCDApp = CreateObject("PCDLRN.Application") Set Part = PCDApp.ActivePartProgram Set PCDCommands = PCDPartProgram.Commands 'Declares Variables from the prg As Objects Dim VPART As Object Dim VDESCRIPTION As Object Dim VSERIALNUMBER As Object Dim VDATE As Object Dim VTIME As Object Dim RESULTS As String 'Pulls the variables from the prg Set VPART = Part.GetVariableValue ("VPART") Set VDESCRIPTION = Part.GetVariableValue ("VDESCRIPTION") Set VSERIALNUMBER = Part.GetVariableValue ("VSERIALNUMBER") Set VDATE = Part.GetVariableValue ("VDATE") Set VTIME = Part.GetVariableValue ("VTIME") 'Declares the Filepath, Folder, And the Filename As a String strPath = Part.Path 'Uses the prg path As the path For the folder 'Sets the folder Name And the Path For the Folder strFolderName = VPART.StringValue & "_" & VDESCRIPTION.StringValue & "_" & VSERIALNUMBER.StringValue & "_" & VDATE.StringValue & "_" & VTIME.StringValue strFolder = strPath & "RESULTS\" & strFolderName 'This command creates the folder Set objFolder = objFSO.CreateFolder(strFolder) End Sub
ASSIGN/VPART="blah_blah" ASSIGN/VREV="1" ASSIGN/VDESCRIPTION="CF34-10A_MILL_AND_MOLD" ASSIGN/VPROGRAMID="PI-0364" ASSIGN/VPROGRAMREV="A" FPTRHARD =FILE/OPEN,D:\CMM_PROGRAMS\PC-DMIS_SUPPORT_FILES\THIS_MACHINES_GLOBAL_SETTINGS\HARDWARE.TXT,READ VLOCALHARDWARE=FILE/READLINE,FPTRHARD,{VHARDWARE} FILE/CLOSE,FPTRHARD,KEEP FPTRSOFT =FILE/OPEN,D:\CMM_PROGRAMS\PC-DMIS_SUPPORT_FILES\THIS_MACHINES_GLOBAL_SETTINGS\SOFTWARE.TXT,READ VLOCALSOFTWARE=FILE/READLINE,FPTRSOFT,{VSOFTWARE} FILE/CLOSE,FPTRSOFT,KEEP CSERIALNUMBER =COMMENT/INPUT,NO,FULL SCREEN=NO, ENTER SERIAL NUMBER (15 CHARACTERS MAX) ASSIGN/VSERIALNUMBER=CSERIALNUMBER.INPUT IF/CSERIALNUMBER.INPUT == 0 ASSIGN/VSERIALNUMBER=" " END_IF/ CCMMOPERATOR =COMMENT/INPUT,NO,FULL SCREEN=NO, ENTER CMM OPERATOR ID ASSIGN/VCMMOPERATOR=CCMMOPERATOR.INPUT IF/CCMMOPERATOR.INPUT == 0 ASSIGN/VCMMOPERATOR=" " END_IF/ CCUSTOM =COMMENT/INPUT,NO,FULL SCREEN=NO, ENTER TOOL ASSIGN/VCUSTOM=CCUSTOM.INPUT IF/CCUSTOM.INPUT == 0 ASSIGN/VCUSTOM=" " END_IF/ CREMARKS =COMMENT/INPUT,NO,FULL SCREEN=NO, ENTER OPTIONAL REMARKS IF DESIRED (30 CHARACTERS MAX) ASSIGN/VREMARKS=CREMARKS.INPUT IF/CREMARKS.INPUT == 0 ASSIGN/VREMARKS=" " END_IF/ TRACEFIELD/NO_DISPLAY,LIMIT=43 ; Part : VPART TRACEFIELD/NO_DISPLAY,LIMIT=7 ; Rev : VREV TRACEFIELD/NO_DISPLAY,LIMIT=43 ; Description : VDESCRIPTION TRACEFIELD/NO_DISPLAY,LIMIT=16 ; Serial Number : VSERIALNUMBER TRACEFIELD/NO_DISPLAY,LIMIT=11 ; Operator : VCMMOPERATOR TRACEFIELD/NO_DISPLAY,LIMIT=16 ; Tool : VCUSTOM TRACEFIELD/NO_DISPLAY,LIMIT=30 ; Remarks : VREMARKS TRACEFIELD/NO_DISPLAY,LIMIT=11 ; Program ID : VPROGRAMID TRACEFIELD/NO_DISPLAY,LIMIT=22 ; Hardware : VHARDWARE TRACEFIELD/NO_DISPLAY,LIMIT=22 ; Software : VSOFTWARE ASSIGN/VDATE=SYSTEMDATE("dd''MMM''yyyy") ASSIGN/VTIME=SYSTEMTIME("hh''mm")
Sub Main 'Declares the File System Object And Instantiates it Dim objFSO Set objFSO = CreateObject("Scripting.FileSystemObject") 'Declares PC-DMIS As the Active Program/Application Dim PCDApp, PCDPartProgram, PCDCommands, PCDCommand, retval Set PCDApp = CreateObject("PCDLRN.Application") Set Part = PCDApp.ActivePartProgram Set PCDCommands = PCDPartProgram.Commands 'Declares Variables from the prg As Objects Dim VPART As Object Dim VDESCRIPTION As Object Dim VSERIALNUMBER As Object Dim VDATE As Object Dim VTIME As Object Dim RESULTS As String 'Pulls the variables from the prg Set VPART = Part.GetVariableValue ("VPART") Set VDESCRIPTION = Part.GetVariableValue ("VDESCRIPTION") Set VSERIALNUMBER = Part.GetVariableValue ("VSERIALNUMBER") Set VDATE = Part.GetVariableValue ("VDATE") Set VTIME = Part.GetVariableValue ("VTIME") 'Declares the Filepath, Folder, And the Filename As a String strPath = Part.Path 'Uses the prg path As the path For the folder 'Sets the folder Name And the Path For the Folder strFolderName = VPART.StringValue & "_" & VDESCRIPTION.StringValue & "_" & VSERIALNUMBER.StringValue & "_" & VDATE.StringValue & "_" & VTIME.StringValue strFolder = strPath & "RESULTS\" & strFolderName 'This command creates the folder Set objFolder = objFSO.CreateFolder(strFolder) End Sub
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |