AnsweredAssumed Answered

PDM Pro - Copy Variable Values from Active Config to Others Using Button

Question asked by Michael Dekoning on Apr 21, 2018
Latest reply on Apr 23, 2018 by Jacob Corder

I am working on an add-in to copy variable values from the active tab to the other card tabs using a button. I have run across an issue. Using IEdmEnumeratorVariable5.GetUpdateVars() or IEdmEnumeratorVariable7.GetVersionVars() was crashing Windows Explorer.




                switch (poCmd.meCmdType)


                    case EdmCmdType.EdmCmd_CardButton:

                        if (poCmd.mbsComment == "Copy Var Values")


                            EdmCmdData ecd = (EdmCmdData)ppoData.GetValue(0);

                            string activeconfigname = ecd.mbsStrData1;

                            IEdmFile5 file = edmVault.GetObject(EdmObjectType.EdmObject_File, ecd.mlObjectID1) as IEdmFile5;

                            IEdmEnumeratorVariable5 evar = (IEdmEnumeratorVariable5)poCmd.mpoExtra;

                            object[] valuelist = null;

                            evar.GetUpdateVars(ecd.mlObjectID2, out valuelist);

                            IEdmStrLst5 cfgs = (IEdmStrLst5)ecd.mpoExtra;

                            //UpdateVariables(ecd.mlObjectID2, activeconfigname, file, evar, cfgs);





When I added code to capture the error I received the following message.


It would appear that this only occurs when using either of these methods from a data card button.  Has anyone else seen this and is there a workaround?