1 Reply Latest reply on Dec 29, 2011 12:28 PM by Michael Dekoning

    Accessing Folder Variables (API)

    Mike Buss

      Are there any good examples for reading variables from Folder data cards in EPDM?

        • Re: Accessing Folder Variables (API)
          Michael Dekoning

          Mike,

           

          There actually is an example in the API help file under IEdmEnumeratorVariable5::GetVar. Of course it is in VB. here's a C# version:

           

                  private void ShowFolderComment(IEdmFolder5 folder)

                  {

                      try

                      {

                          IEdmEnumeratorVariable5 evar = null;

                          evar = folder as IEdmEnumeratorVariable5;

                          object value = null;

                          if (evar.GetVar("comment", "", out value))

                              MessageBox.Show(value.ToString());

                          else

                              MessageBox.Show("<No comment found>");

                      }

                      catch

                      {

                          MessageBox.Show("<Error>");

                      }

                  }

           

          Mike

          EPDM 2011 SP2