5 Replies Latest reply on Sep 14, 2016 4:32 PM by Rajat Jain

    VBA EPDM check in help?

    Aaron Torberg

      I have this code witch seems to run okay, but after it completes the part the macro creates seems to enter a state of limbo where it doesn't enter the workflow as expected.  Here is the code:

      Capture1.JPG

      Normally when I check these parts in it enters a state "initiated" and an automatic transition carries the part to "Released".  But when the code runs the info in the EPDM fly out just turns grey and and the transition I expected to happen never does...?   The part is available for check out, and if I check it out, then back in, the workflow takes over and the automatic transition happens. The goal is to check the part in automatically so the user does not have to - what am I missing?  These are new parts being added to the vault if that makes a difference.

       

      Here is a screenshot of the fly out menu after the code executes:

      Capture2.JPG

      Then after a check out and back in manually (what I want/expect to happen through the use of the check in code):

      Capture3.JPG

        • Re: VBA EPDM check in help?
          Jesse Seger

          I don't believe setting a transition to Automatic forces the transition to "pull" it through.  It's simply a flag for the check-in dialog.  If the dialog sees an automatic transition, it attempts to "push" it through. 

           

          You'll have to do the same thing by calling IEdmFile10::ChangeState2.  Interestingly enough, it appears the automatic flag would be useless to you if you already know the state you're trying to get to. 

          • Re: VBA EPDM check in help?
            Rajat Jain

            Hello Aaron,

            I had a similar issue in one of my projects. I did the following to fix it: -

            • Put a comment in the unlock command. The initial file check in required a comment in my case.
            • Did you perform any other operation on this file? Put the last line (File.unlock()) in try catch statements and catch the error. File.Unlock() generates an error if the file is not checked in.

            Hope it helps!!!

            Rajat Jain