Why, I open the program by automation in the pcdmis2015.1 , PCDMIS from online mode to offline mode, but can be opened and executed normally in 2014.1.
The code is as follows:
Private Sub Command1_Click()
Set DmisApp = CreateObject("PCDLRN.Application")
Set DmisParts = DmisApp.PartPrograms
Call DmisParts.Open("C:\Users\Public\Documents\WAI\PC-DMIS\2015.1\t3.PRG", CMM1)
Set Dmispart = DmisApp.ActivePartProgram
Set DmisCommands = Dmispart.Commands
CommandCount = DmisCommands.Count
Set DmisCommand = DmisCommands.Item(CommandCount)
DmisCommands.InsertionPointAfter DmisCommand
Dmispart.EXECUTE
End Sub
I don't quite understand what you're asking, but I can guess - is PC-DMIS 2015.1 starting the program in
offline mode, while 2014.1 starts it in
online?
The
CMM1 should really be
"CMM1" (including quotes). Doing it your way means using the contents of the Basic variable CMM1 as machine name, and your shown code doesn't do
CMM1 = "something" anywhere...
I don't know why it would work in 2014.1 - probably because...