hexagon logo

help, auto save .prg after run, in a specific location variable.

I have been looking through all the past topics about this. but I am having trouble getting them working. I tried copy and pasting a few of them. and saving them as a .bas file and running the script. but i cant get one to work for me.


i currently already have a script that auto creates a folder from an operator input and saves the cmm report in that folder.

so ideally i want to follow that same train of thought and save a .prg & .cad in that same folder already created.


please advice.

Parents
  • Thought that I had it here, but no such luck.

    newname = "Q:\Quality\In Process Inspection Plans\" & PartNo.StringValue & "\CMM REPORTS\" & ObjFolder & "\" & PCDPartProgram.PartName & " - " & SerialNo & ".PRG" 
    
  • So would it need to be like this?

    newname = "Q:\Quality\In Process Inspection Plans\" & PartNo.StringValue & "\CMM REPORTS\" & ObjFolder & "\\" & PCDPartProgram.PartName & " - " & SerialNo & ".PRG" 
    


    I still get the same error message...

    Same with this Disappointed

    newname = "Q:\\Quality\\In Process Inspection Plans\\" & PartNo.StringValue & "\\CMM REPORTS\\" & ObjFolder & "\\" & PCDPartProgram.PartName & " - " & SerialNo & ".PRG" 
    
Reply
  • So would it need to be like this?

    newname = "Q:\Quality\In Process Inspection Plans\" & PartNo.StringValue & "\CMM REPORTS\" & ObjFolder & "\\" & PCDPartProgram.PartName & " - " & SerialNo & ".PRG" 
    


    I still get the same error message...

    Same with this Disappointed

    newname = "Q:\\Quality\\In Process Inspection Plans\\" & PartNo.StringValue & "\\CMM REPORTS\\" & ObjFolder & "\\" & PCDPartProgram.PartName & " - " & SerialNo & ".PRG" 
    
Children
No Data