hexagon logo

Partname variable for file saving?

How can I get the Part Name (here it is xx12345) to use it in my file saving/printing routine (usual with system date and time etc). I do NOT want to add an input comment asking for the Part Name because I have lots of legacy programmes and just want to change the very end of the programme where it prints out. Existing code below, the V1 assignment does NOT work, the help documentation says Partname() is a variable only available in the reporting language, but hopefully someone has a solution?!

PART NAME : xx12345
REV NUMBER :
SER NUMBER :
STATS COUNT : 1

STARTUP =ALIGNMENT/START,RECALL:,LIST=YES
ALIGNMENT/END
MODE/MANUAL
MANRETRACT/0.7874
FORMAT/TEXT,OPTIONS, ,HEADINGS,SYMBOLS, ;NOM,TOL,MEAS,DEV,OUTTOL, ,
LOADPROBE/2mmx40mm
TIP/T1A0B0, SHANKIJK=0, 0, 1, ANGLE=90
WO =COMMENT/INPUT,YES,'ENTER WO NUMBER'
ASSIGN/DATE=SYSTEMDATE("MM_dd_yyyy")
ASSIGN/TIME=SYSTEMTIME("HH_mm")
ASSIGN/V1=PARTNAME()
ASSIGN/FILENAMEVAR="G:\Quality\Public\Inspection\CMM\PDF_Files\"+v1+"_"+WO.INPUT+"_"+DATE+"_"+TIME+".PDF"
PRINT/REPORT,EXEC MODE=END,$
TO_FILE=ON,OVERWRITE=FILENAMEVAR,$
TO_PRINTER=OFF,$
TO_DMIS_REPORT=OFF,FILE_OPTION=INDEX,FILENAME=,$
REPORT_THEORETICALS=NONE,REPORT_FEATURE_WITH_DIMENSIONS=NO,$
PREVIOUS_RUNS=DELETE_INSTANCES
Parents
  • That would have been my bonus question (the other file header stuff)!
    We import a lot of DMI files, and one thing we repetitively have to do AFTER each import/programme is to go to Edit>Preferences>Setup and Uncheck the option "Treat theo values as if stored in part coordinates" (I believe this option is ALWAYS switched on when you do a DMI import so PCDMIS doesn't get confused about values as it does the import, but if anyone knows more about this please enlighten me!). Do you know any way to achieve this control (switch off the option) by use of code?
    Mark
Reply
  • That would have been my bonus question (the other file header stuff)!
    We import a lot of DMI files, and one thing we repetitively have to do AFTER each import/programme is to go to Edit>Preferences>Setup and Uncheck the option "Treat theo values as if stored in part coordinates" (I believe this option is ALWAYS switched on when you do a DMI import so PCDMIS doesn't get confused about values as it does the import, but if anyone knows more about this please enlighten me!). Do you know any way to achieve this control (switch off the option) by use of code?
    Mark
Children
No Data