hexagon logo

Get the information from the program visible in Command Mode via VB or C#?

I'm specifically interested in the date and time.​


Attached Files
Parents
  • hi,

    this is the time and date of the respective PC / System



    pcDMIS commands
      ASSIGN/V1=GETPROGRAMINFO("DATE​")
      ASSIGN/V2=GETPROGRAMINFO("TIME​")
    



    VBA commands
    Dim MyTime
    MyTime = Time ' Return current system time.
    
    Dim MyDate
    MyDate = Date ' MyDate contains the current system date.
    
    Dim Today
    Today = Now ' Assign current system date and time.
    

Reply
  • hi,

    this is the time and date of the respective PC / System



    pcDMIS commands
      ASSIGN/V1=GETPROGRAMINFO("DATE​")
      ASSIGN/V2=GETPROGRAMINFO("TIME​")
    



    VBA commands
    Dim MyTime
    MyTime = Time ' Return current system time.
    
    Dim MyDate
    MyDate = Date ' MyDate contains the current system date.
    
    Dim Today
    Today = Now ' Assign current system date and time.
    

Children
  • Unfortunately, one of the requirements of my project is that I can't change the programs themselves. In my tests I see those values updating when the program is done executing. I have access to the PartProgram object in my code but I can't tell if the existing values are accessible or not via the PCDLRN interfaces. When a report print is triggered I want to be able to get the existing date and time values from the part program.

    Triggers when a report is printed:

    public void OnReportPrintStart(PCDLRN.PartProgram PartProg)