hexagon logo

Launch PC-DMIS in Operator Mode through VB

I searched through the forum and couldn't find a solution for my issue.

I was wondering if it is possible to launch pc-dmis in operator mode from a script.

I made a front end GUI and wanted to be able to display pc dmis (in operator mode) while it's running a program. Right now I just hide everything besides the Execution window.

I'll attach the code I'm using to start pc dmis if it helps

TIA

Sub PCDMISProgramRun()


Dim PCDApp, PCDPartProgram, PCDProgramCommand


''

Set PCDApp = CreateObject("PCDLRN.Application") 'Opens PC-DMIS

    If Not PCDApp.WaitUntilReady(300) Then
        MsgBox "Machine did not initialize, Exiting"
        Exit Sub
    End If

    PCDApp.Visible = False
Parents
  • Awesome, that works perfectly.

    Thank you for your help.

    Solution:

    I inserted this code to create the text file before launching PC-DMIS

    Dim scrObj
        Dim textObj
    
        Set scrObj = CreateObject("Scripting.FileSystemObject")
        Set textObj = scrObj.CreateTextFile("C:\Program Files\Hexagon\PC-DMIS 2019 R1 64-bit\AutomationStartupOptions.txt", True)
        textObj.WriteLine ("/o")
        textObj.Close


Reply
  • Awesome, that works perfectly.

    Thank you for your help.

    Solution:

    I inserted this code to create the text file before launching PC-DMIS

    Dim scrObj
        Dim textObj
    
        Set scrObj = CreateObject("Scripting.FileSystemObject")
        Set textObj = scrObj.CreateTextFile("C:\Program Files\Hexagon\PC-DMIS 2019 R1 64-bit\AutomationStartupOptions.txt", True)
        textObj.WriteLine ("/o")
        textObj.Close


Children
No Data