hexagon logo

Save reports in PDF automatically and use date and time as name

Hi,

I want to save the reports automatically after every run and use date and time for the name file. How I can do that?

Thanks!
Parents
  • GETPROGRAMINFO

    This function returns the measurement routine's information based on the parameters passed in: GETPROGRAMINFO(<String>, <Optional String>Wink

    This function has at most two strings as parameters. For most items, you only need the first parameter. The string fields are not case sensitive.

    First Field—String

    The first field is a string input detailing what information to return.

    DATE - Returns the current date.

    TIME - Returns the current time.

    PARTNAME - Returns the part name as defined in the measurement routine header.

    PARTPATH - Returns the full pathway to the measurement routine file.

    REVISION - Returns the revision number as defined in the heading.

    DRAWING - Like REVISION, this also returns the revision number as defined in the heading.

    SERIALNUM - Returns the serial number as defined in the header.

    STATSCOUNT - Returns the current stats count.

    SEQNUM - Like STATSCOUNT, this string also returns the current stats count number.

    SHRINK - Returns the global scale factor.

    NUMMEAS - Returns the number of dimensions executed.

    NUMOOT - Returns the number of out of tolerance dimensions executed.

    ELAPSEDTIME - Returns the time that has passed since the beginning of the execution.

    FILENAME - Returns the measurement routine's file name (.prg).

    CADMODELFILE - Returns the full path to the file name of the CAD model that you imported into the measurement routine.

    CADMODELFILENAME - Returns the name of only the CAD model (not the path) that you imported into the measurement routine.

    REPORTNAME - Returns the current output file name.

    TEMP - Returns the temperature for the optional second input string. See "Second Field—Optional String" below.

    PRGVERSION - Returns a string value of the PC-DMIS version number of the measurement routine file. You can save a measurement routine file to be compatible with a specific version. For more information, see " Save As" in the " Using Basic File Options" chapter.

    PRGSCHEMA - Returns an integer of the PC-DMIS schema number of the measurement routine file. This is an internal value used by PC-DMIS used to indicate the commands and options that are serialized.

    PCDMISVERSION - Returns a string value of the actual installed version of the PC-DMIS software.

    Second Field—Optional String

    The second field is an optional string input. It's only needed if TEMP is used in the in the first input field. The possible strings below come from the Temperature Compensation command. For more information, see " Compensating For Temperature" in the " Setting Your Preferences" chapter.

    TEMPP - Returns the temperature for the part sensor

    TEMPX - Returns the temperature for the X axis sensor

    TEMPY - Returns the temperature for the Y axis sensor

    TEMPZ - Returns the temperature for the Z axis sensor

    REF_TEMP - Returns the reference temperature

    HIGH_THRESHOLD - Returns the high threshold temperature

    LOW_THRESHOLD - Returns the low threshold temperature

    Example

    $$ NO, This code sample displays the number of total dimensions and the number of out-of-tolerance dimensions.

    ASSIGN/V1=GETPROGRAMINFO("NUMMEAS")

    ASSIGN/V2=GETPROGRAMINFO("NUMOOT")

    COMMENT/REPT

    "Total Dimensions: "+V1

    "Total Out of Tolerance: "+V2

    $$ NO,This code sample returns the temperature on the Z sensor axis.

    ASSIGN/V3=GETPROGRAMINFO("TEMP", "TEMPZ")

    COMMENT/REPT

    "Temperature on the Z axis: "+V3

    https://docs.hexagonmi.com/pcdmis/2020.1/en/helpcenter/index.htm?rhcsh=1&rhnewwnd=0#t=mergedProjects%2Fcore%2F26_expression_topics%2FString_Functions.htm
Reply
  • GETPROGRAMINFO

    This function returns the measurement routine's information based on the parameters passed in: GETPROGRAMINFO(<String>, <Optional String>Wink

    This function has at most two strings as parameters. For most items, you only need the first parameter. The string fields are not case sensitive.

    First Field—String

    The first field is a string input detailing what information to return.

    DATE - Returns the current date.

    TIME - Returns the current time.

    PARTNAME - Returns the part name as defined in the measurement routine header.

    PARTPATH - Returns the full pathway to the measurement routine file.

    REVISION - Returns the revision number as defined in the heading.

    DRAWING - Like REVISION, this also returns the revision number as defined in the heading.

    SERIALNUM - Returns the serial number as defined in the header.

    STATSCOUNT - Returns the current stats count.

    SEQNUM - Like STATSCOUNT, this string also returns the current stats count number.

    SHRINK - Returns the global scale factor.

    NUMMEAS - Returns the number of dimensions executed.

    NUMOOT - Returns the number of out of tolerance dimensions executed.

    ELAPSEDTIME - Returns the time that has passed since the beginning of the execution.

    FILENAME - Returns the measurement routine's file name (.prg).

    CADMODELFILE - Returns the full path to the file name of the CAD model that you imported into the measurement routine.

    CADMODELFILENAME - Returns the name of only the CAD model (not the path) that you imported into the measurement routine.

    REPORTNAME - Returns the current output file name.

    TEMP - Returns the temperature for the optional second input string. See "Second Field—Optional String" below.

    PRGVERSION - Returns a string value of the PC-DMIS version number of the measurement routine file. You can save a measurement routine file to be compatible with a specific version. For more information, see " Save As" in the " Using Basic File Options" chapter.

    PRGSCHEMA - Returns an integer of the PC-DMIS schema number of the measurement routine file. This is an internal value used by PC-DMIS used to indicate the commands and options that are serialized.

    PCDMISVERSION - Returns a string value of the actual installed version of the PC-DMIS software.

    Second Field—Optional String

    The second field is an optional string input. It's only needed if TEMP is used in the in the first input field. The possible strings below come from the Temperature Compensation command. For more information, see " Compensating For Temperature" in the " Setting Your Preferences" chapter.

    TEMPP - Returns the temperature for the part sensor

    TEMPX - Returns the temperature for the X axis sensor

    TEMPY - Returns the temperature for the Y axis sensor

    TEMPZ - Returns the temperature for the Z axis sensor

    REF_TEMP - Returns the reference temperature

    HIGH_THRESHOLD - Returns the high threshold temperature

    LOW_THRESHOLD - Returns the low threshold temperature

    Example

    $$ NO, This code sample displays the number of total dimensions and the number of out-of-tolerance dimensions.

    ASSIGN/V1=GETPROGRAMINFO("NUMMEAS")

    ASSIGN/V2=GETPROGRAMINFO("NUMOOT")

    COMMENT/REPT

    "Total Dimensions: "+V1

    "Total Out of Tolerance: "+V2

    $$ NO,This code sample returns the temperature on the Z sensor axis.

    ASSIGN/V3=GETPROGRAMINFO("TEMP", "TEMPZ")

    COMMENT/REPT

    "Temperature on the Z axis: "+V3

    https://docs.hexagonmi.com/pcdmis/2020.1/en/helpcenter/index.htm?rhcsh=1&rhnewwnd=0#t=mergedProjects%2Fcore%2F26_expression_topics%2FString_Functions.htm
Children
No Data