hexagon logo

File I/O Command - File Dialog default directory

Objective: When a user completes an inspection routine a file dialog will open allowing a user to choose a (.pdf) report which was previously created. The current inspection results will then be appended to the selected file.

The problem: The native PCDMIS File Dialog command does not allow a user to specify the initial path. The default behavior is to open the most recent used location. This is a problem because the user will need to navigate a rather large and confusing file system rather than having the initial path open where they need to be.

The question: does anyone know where the default (recent) path is stored so I can intervene programmatically and set the File Dialog path to whatever I need? I can not find it in the registry or any .dat or .log files that I've searched.

Using VBScript I have tried invoking a Microsoft Word FileDialog() to accomplish this task and it works how I want except I get a "Server Busy" error stating "This action cannot be completed because the other program is busy. Choose 'Switch To' to activate the busy program and correct the problem". It seems that PCDMIS doesn't like to wait more than a few seconds for the other program (Word) to return a result. I have tried multiple methods to suppress this error but it comes up no matter what I try.

It seems that I need to use the File I/O Command File Dialog but I can't figure out how to direct the "Open" location?

Thanks for looking!
Parents
  •             ASSIGN/ST_TM=SYSTEMTIME("HH-mm-ss")
                ASSIGN/SYS_DT=SYSTEMDATE("MM-dd-yyy'")
                ASSIGN/MTI1="S:\XXX_CMM_Programs\CUSTOMER\PART NAME\06-REPORTS\\" [COLOR=#FF0000]<--PATH[/COLOR]
                ASSIGN/MTI2="NAME IT HOWEVER YOU WISH"  [COLOR=#FF0000] <-- FILE NAME[/COLOR]
                ASSIGN/MTI3=CONCAT(MTI2," CAVITY-",C1.INPUT," ",ST_TM," ",SYS_DT)
                ASSIGN/MTI4=CONCAT(MTI1,MTI3)
                PRINT/REPORT,EXEC MODE=END,$
                  TO_FILE=ON,[COLOR=#FF0000]APPEND[/COLOR]=MTI4,AUTO OPEN REPORT=OFF,$
                  TO_PRINTER=OFF,COPIES=1,$
                  TO_DMIS_REPORT=OFF,FILE_OPTION=INDEX,FILENAME=,$
                  REPORT_THEORETICALS=ALL,REPORT_FEATURE_WITH_DIMENSIONS=YES,$
                  TO_EXCEL_OUTPUT=OFF,
                  PREVIOUS_RUNS=DELETE_INSTANCES
    


    No operator input is required. This does all of that for you.

    Mike
Reply
  •             ASSIGN/ST_TM=SYSTEMTIME("HH-mm-ss")
                ASSIGN/SYS_DT=SYSTEMDATE("MM-dd-yyy'")
                ASSIGN/MTI1="S:\XXX_CMM_Programs\CUSTOMER\PART NAME\06-REPORTS\\" [COLOR=#FF0000]<--PATH[/COLOR]
                ASSIGN/MTI2="NAME IT HOWEVER YOU WISH"  [COLOR=#FF0000] <-- FILE NAME[/COLOR]
                ASSIGN/MTI3=CONCAT(MTI2," CAVITY-",C1.INPUT," ",ST_TM," ",SYS_DT)
                ASSIGN/MTI4=CONCAT(MTI1,MTI3)
                PRINT/REPORT,EXEC MODE=END,$
                  TO_FILE=ON,[COLOR=#FF0000]APPEND[/COLOR]=MTI4,AUTO OPEN REPORT=OFF,$
                  TO_PRINTER=OFF,COPIES=1,$
                  TO_DMIS_REPORT=OFF,FILE_OPTION=INDEX,FILENAME=,$
                  REPORT_THEORETICALS=ALL,REPORT_FEATURE_WITH_DIMENSIONS=YES,$
                  TO_EXCEL_OUTPUT=OFF,
                  PREVIOUS_RUNS=DELETE_INSTANCES
    


    No operator input is required. This does all of that for you.

    Mike
Children
No Data