1 Reply Latest reply on Sep 4, 2015 6:23 PM by Nicolas Ziegler

    Run Code When the Datacard opens

    Nicolas Ziegler



      I am just starting to play with EPDM API so my knowledge is quite limited. I have managed to change variables values with a CardInput hook, thanks to the Help, but I am now looking to run some code when the card opens.

      I want some actions to be executed each time  the Datacard is opened trough SolidWorks or trough EPDM explorer.


      Is there a special hook for that, some kind of equivalent of:


      that I can use to trigger actions at the card loading?


      Thank you for your help!

        • Re: Run Code When the Datacard opens
          Nicolas Ziegler

          I have found a workaround but I am sure there is something designed to do it. I don't really like doing it this way, it does not seem right.

          I use the following hook:



          (A file or folder data card containing a list box or combo box is displayed).


          Luckily, I have a combobox in my datacard so I can identify that the card is actually displayed/opened with it and run some code. I had an issue because I wanted to set some variables but noticed that not all of them were correctly updated. I solved the problem in adding a new combobox. I guess it loads last because it has a bigger control ID so the rest of the card is already loaded and ready to have its variables modified... Or maybe it is the position of the control on the datacard, I am not sure.


          Does anyone have another idea?