hexagon logo

automatio' for pcdmis2015.1

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



'' automatio' for pcdmis2015.1
Parents
  • When went from 2013 to 2016 (both on the PC at the same time) I had to point my scripts to 2016 by adding ".11.0" after the "PCDLRN.Application"

    Set PCDApp = CreateObject("PCDLRN.Application.11.0")

    I don't know what the secret hand shake for 2015 is but maybe try ".10.0" as a guess

    Or maybe need to change your reference library.
Reply
  • When went from 2013 to 2016 (both on the PC at the same time) I had to point my scripts to 2016 by adding ".11.0" after the "PCDLRN.Application"

    Set PCDApp = CreateObject("PCDLRN.Application.11.0")

    I don't know what the secret hand shake for 2015 is but maybe try ".10.0" as a guess

    Or maybe need to change your reference library.
Children
No Data