1 Reply Latest reply on May 12, 2011 1:13 PM by jofosa

    Macros and Dialog Boxes

    tony

        Greetings,

       

        I am using PADS Logic 9.0.1 and I am trying to write a macro to rename connections.  The problem is

      interacting with the 'Net Properties' dialog box.  If my macro has a constant value for the net name

      all is well - like this

       

      DlgQueryNet.NetName.Text = "NEW_NAME"

       

      But, if the new name is in a variable the macro gets stuck

       

      netname = "NEW_NAME"

      DlgQueryNet.NetName.Text = netname

       

      Any ideas how I can better deal with dialogs from a Macro?

       

        Thanks.

       

        --tlk

        • 1. Re: Macros and Dialog Boxes
          jofosa

          Try declaring the variable as "modal" and using it; see this example:

           

          ' Declaring a variable that is "visible" in the dialog box
          modal strTestText
          strTestText = "Hello"

          'Creating text and setting its value to the "modal varible"
          Application.ExecuteCommand("Create Text")
          DlgAddText.Text = strTestText
          DlgAddText.Ok.Click()

          ' Placing the text in a fixed location
          Application.ExecuteCommand("Place", 7346, 5292)
          DlgAddText.Cancel.Click()