hexagon logo

Need a little guidance

Has anyone come across a way to export a program run as basic?
Or, has come across a way to export a program run in a way that can be imported back in later for review?

I know it may seem unnecessary.

My lab does a lot of protoyping, and as a result the customer sometimes desires to change datum scheme/bonus/hit targets/profile tolerances as the process goes on.
It gets tedious to have to re-run a part to get updated dimensional data.

Is there a solid way to do it?
I've exported programs as basic before, then re-uploaded them.
So i would assume it is possible.

I would just prefer an automated approach, anyone point me in a direction?
Parents
  • i'm not sure this is the correct source variable. in my fileheader i work with =SERIAL_NUMBER and i get what i filled in so i thought it will be the same.




    There's no correlation between "Report BASIC" and "Script BASIC". If you need the SER NUMBER from the program you need something like this (off the top of my head, untested, code):

    Dim App As Object
    Dim Part As Object
    Sub main
      Set App = CreateObject("PCDLRN.Application")
      Set Part = App.ActivePartProgram
      Serial = Part.SerialNumber
    End Sub
    

  • Thank you so much. it worked.
    the script looks like this:
    'Add Serial Number To Path
    Set App = CreateObject("PCDLRN.Application")
    Set Part = App.ActivePartProgram
    Serial = Part.SerialNumber
    
    'Genrate the destination (save) path
    dest_path = archivePath & "\" & progname & "\" & progname & "_" & Serial & "_" & uid & "_" & Format(Now(), "YYYYMMDDHHNN") & ".prg"
    'MsgBox(dest_path)


    Thank you, again
Reply
  • Thank you so much. it worked.
    the script looks like this:
    'Add Serial Number To Path
    Set App = CreateObject("PCDLRN.Application")
    Set Part = App.ActivePartProgram
    Serial = Part.SerialNumber
    
    'Genrate the destination (save) path
    dest_path = archivePath & "\" & progname & "\" & progname & "_" & Serial & "_" & uid & "_" & Format(Now(), "YYYYMMDDHHNN") & ".prg"
    'MsgBox(dest_path)


    Thank you, again
Children
No Data