Your Products have been synced, click here to refresh
Sub Main ' THIS SECTION DECLARES THE VARIABLES For THE FILENAME SAVE And FOLDER CREATE ' "SET" DECLARES THE VALUE OF THE VARIABLES ' "PART.GETVARIABLEVALUE" PULLS THE VARIABLE VALUE FROM THE .PRG UPON EXECUTION Dim App As Object Set App = CreateObject("PCDLRN.Application") Dim PART As Object Set Part = App.ActivePartProgram 'Declares PartProg As the Active part program Set PartProg = App.ActivePartProgram Set Cmds = Part.Commands Set VSERIAL = PART.GETVARIABLEVALUE ("VSERIALNUMBER") Set VDATE = PART.GETVARIABLEVALUE ("VDATE") Set VTIME = PART.GETVARIABLEVALUE ("VTIME") Set VPARTNUMBER = PART.GETVARIABLEVALUE ("VPART") Set VDESCRIPTION = PART.GETVARIABLEVALUE ("VDESCRIPTION") Set RESULTS = RESULTS Set VPROGRAMID = PART.GETVARIABLEVALUE ("VPROGRAMID") 'Creates the file folder path Set FILENAME = CREATEOBJECT(VPART & "_" & VDESCRIPTION & "_" & VSERIALNUMBER & "_" & VDATE & "_" & VTIME) Set FILEPATH = CREATEOBJECT("D:\CMM_PROGRAMS\" & VPART & "_" & VDESCRIPTION & "_" & VPROGRAMID & "\" & RESULTS & "\") Set FOLDER = CREATEOBJECT(FILEPATH & FILENAME) End Sub
Sub Main ' THIS SECTION DECLARES THE VARIABLES For THE FILENAME SAVE And FOLDER CREATE ' "SET" DECLARES THE VALUE OF THE VARIABLES ' "PART.GETVARIABLEVALUE" PULLS THE VARIABLE VALUE FROM THE .PRG UPON EXECUTION Dim App As Object Set App = CreateObject("PCDLRN.Application") Dim PART As Object Set Part = App.ActivePartProgram 'Declares PartProg As the Active part program Set PartProg = App.ActivePartProgram Set Cmds = Part.Commands Set VSERIAL = PART.GETVARIABLEVALUE ("VSERIALNUMBER") Set VDATE = PART.GETVARIABLEVALUE ("VDATE") Set VTIME = PART.GETVARIABLEVALUE ("VTIME") Set VPARTNUMBER = PART.GETVARIABLEVALUE ("VPART") Set VDESCRIPTION = PART.GETVARIABLEVALUE ("VDESCRIPTION") Set RESULTS = RESULTS Set VPROGRAMID = PART.GETVARIABLEVALUE ("VPROGRAMID") 'Creates the file folder path Set FILENAME = CREATEOBJECT(VPART & "_" & VDESCRIPTION & "_" & VSERIALNUMBER & "_" & VDATE & "_" & VTIME) Set FILEPATH = CREATEOBJECT("D:\CMM_PROGRAMS\" & VPART & "_" & VDESCRIPTION & "_" & VPROGRAMID & "\" & RESULTS & "\") Set FOLDER = CREATEOBJECT(FILEPATH & FILENAME) End Sub
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |