hexagon logo

OLE automation error between 2013 MR1 SP5 and 2014 SP1

I am currently using 2013 MR1 SP5. I have several automation scripts i've been running for years, I installed 2014 SP1 on my CMM to prepare to start using it but apart from it opening the first time after installing, I haven't used it. I am still using 2013 to run the CMM. The issue is the now my BAS scripts won't run in 2013. I started up 2014 and the BAS program will run fine there, it just will not run in 2013 any more the ole automation error I get is at line 6 in my Bas Program which is this line

Sub Main()
Dim PCDApp, PCDPartPrograms, PCDPartProgram, PCDCommands, PCDCommand As Object
Dim Partnumber, Partname, Supplier, Count%, ECount%, TextLine, EmpList$ ( ), EmpNum% ( ), MachName$ ( ), MachNum% ( ), last$
Dim strPrgName$, strNewName$, strNoExt$, strPath$, FindDot

[B][I][U][COLOR="#FF0000"]Set PCDApp = CreateObject("PCDLRN.Application")[/COLOR][/U][/I][/B]
Set PCDPartPrograms = PCDApp.PartPrograms
Set PCDPartProgram = PCDApp.ActivePartProgram
Set PCDCommands = PCDPartProgram.Commands


this is the first time an upgrade has affected my basic scripts. I don't have a problem using 2014 on the CMM as I do 98% of my programming offline and the software isn't used for all the newfangled programming stuff they've put in.

But my question is, why. and can I fix it so I can still run older versions of PC-DMIS if I choose.

I have a ticket started on this issue.
  • I am currently using 2013 MR1 SP5. I have several automation scripts i've been running for years, I installed 2014 SP1 on my CMM to prepare to start using it but apart from it opening the first time after installing, I haven't used it. I am still using 2013 to run the CMM. The issue is the now my BAS scripts won't run in 2013. I started up 2014 and the BAS program will run fine there, it just will not run in 2013 any more the ole automation error I get is at line 6 in my Bas Program which is this line

    Sub Main()
    Dim PCDApp, PCDPartPrograms, PCDPartProgram, PCDCommands, PCDCommand As Object
    Dim Partnumber, Partname, Supplier, Count%, ECount%, TextLine, EmpList$ ( ), EmpNum% ( ), MachName$ ( ), MachNum% ( ), last$
    Dim strPrgName$, strNewName$, strNoExt$, strPath$, FindDot
    
    [B][I][U][COLOR="#FF0000"]Set PCDApp = CreateObject("PCDLRN.Application")[/COLOR][/U][/I][/B]
    Set PCDPartPrograms = PCDApp.PartPrograms
    Set PCDPartProgram = PCDApp.ActivePartProgram
    Set PCDCommands = PCDPartProgram.Commands
    


    this is the first time an upgrade has affected my basic scripts. I don't have a problem using 2014 on the CMM as I do 98% of my programming offline and the software isn't used for all the newfangled programming stuff they've put in.

    But my question is, why. and can I fix it so I can still run older versions of PC-DMIS if I choose.

    I have a ticket started on this issue.


    what error are you getting?
  • For reasons I don't fully understand, pc-dmis scripts will only work in whatever version was last run as admin.

    Here is the best fix for the problem (from user whaberman):
    Change the permissions for the registry key [HKEY_CLASSES_ROOT\PCDLRN.Application] so that regular user accounts have full access.
  • see, I thought that was the problem, up until we got our new IT service, the account was administrator. It is not now, although it belongs to the admin group. I first noticed it had changed when the auto updater showed SP5 was available and I couldn't download it and had to log out and log in as local admin to install 2013 MR1 SP5. Even then the script worked, but once I installed 2014 MR1 it stopped working.

    I've started a ticket and I am waiting for Hexagon to explain. I've also notified my computer guy here ( not the IT service) again about the admin situation. maybe someone will have another answer before I have to take it upon myself to muck around in the registry.
  • For reasons I don't fully understand, pc-dmis scripts will only work in whatever version was last run as admin.

    Here is the best fix for the problem (from user whaberman):
    Change the permissions for the registry key [HKEY_CLASSES_ROOT\PCDLRN.Application] so that regular user accounts have full access.


    You are going to have to go HKEY_Classes_Root, and find PCDLRN.Application. There should be one for 2013 and one for 2014, and they will have numbers after them. I have both 2011 and 2012. 2011 was PCDLRN.Application.6.1 and 2012 was PCDLRN.Application.7.1. You have to change "PCDLRN.Application" in this line to the older version: Set PCDApp = CreateObject("PCDLRN.Application").
    ("PCDLRN.Application.6.1" for example). I am guessing in your case it would be .8.1 for 2013. They should now work in the old version, but they will not work in the newer version. I have two copies of all my scripts, one with the .6.1 extension so I can use them in the older version, and one with just PCDLRN.Application for use in the newer version.
  • I have two copies of all my scripts, one with the .6.1 extension so I can use them in the older version, and one with just PCDLRN.Application for use in the newer version.

    If you change the permissions on the registry key, you won't have to keep version-specific scripts.



    Sent from my SPH-L710 using Tapatalk
  • If you change the permissions on the registry key, you won't have to keep version-specific scripts.



    Sent from my SPH-L710 using Tapatalk


    This ^^!
    Been there, done that... Fixed the problem.
  • If you change the permissions on the registry key, you won't have to keep version-specific scripts.



    Sent from my SPH-L710 using Tapatalk


    Sounds like I went about it the hard way, but it also worked. I don't know how to change permissions to a registry key. Something else to monkey around with I guess Slight smile

  • ("PCDLRN.Application.6.1" for example). I am guessing in your case it would be .8.1 for 2013.

    This is exactly what tech support said. I've gone on to Using 2014 on the CMM, not changing back now.
    The weird thing is, it all works on my off line seat just fine.
  • For reasons I don't fully understand, pc-dmis scripts will only work in whatever version was last run as admin.

    Here is the best fix for the problem (from user whaberman):
    Change the permissions for the registry key [HKEY_CLASSES_ROOT\PCDLRN.Application] so that regular user accounts have full access.


    I went in the registry and looked at this, but I didn't see what to change it to.