Showing results 1 to 1 of 1

Thread: Sample How to use DynProbertiesEnum

  1. #1
    Join Date
    28.07.2008
    Posts
    64

    Default Sample How to use DynProbertiesEnum

    This is just a sample to show how to use DynProbertiesEnum with VSTA:

     public void Macro_DynProberyEnum()
            {
                //DynProbertiesENum
                this.Application.DebugPrint("Test Macro_Sepp",zenOn.tpDebugPrintStyle.tpMsg);
    
                zenOn.IVariable myVariable = this.ActiveDocument.Variables().Item("Test_Var_Int_01");
    
                string [] DynProps = (string[]) myVariable.get_DynPropertiesEnum("");
    
                System.Diagnostics.Debug.WriteLine("Test");
    
                foreach (string i in DynProps)
                {
                    System.Diagnostics.Debug.WriteLine(i);
                }
            }

    VB.NET Code:
     Public Sub Macro_DynProbertiesEnum()
            Try
                Dim zDyn_DynPictures_Cel As Object = Me.Application.MyWorkspace.ActiveDocument.DynPictures().Item("Cel").get_DynPropertiesEnum("")
    
                For Each i As String In zDyn_DynPictures_Cel
                    Me.Parent.DebugPrint("ENUM : " + i, zenOn.tpDebugPrintStyle.tpMsg)
                Next
    
            Catch ex As Exception
                Me.Parent.DebugPrint("ERROR Macro_DynProbertiesEnum : " + ex.Message.ToString(), zenOn.tpDebugPrintStyle.tpErr)
            End Try
        End Sub
    Last edited by tulon : 21st June 2010 at 11:56

Similar Threads

  1. Replies: 1
    Last Post: 25th July 2013, 11:07
  2. Replies: 0
    Last Post: 11th March 2010, 16:04
  3. Replies: 0
    Last Post: 11th March 2010, 15:59
  4. Information Unlimited 16 - Sample
    By robertf in forum VBA
    Replies: 0
    Last Post: 28th November 2008, 13:34

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •