Graphics

 View Only
  • 1.  Layer visibility based on Text

    Posted 05-13-2016 14:38
    I am wondering if there is a script that will make a layer or group visible if anything is typed in the text object


    We have a lower third that has a qualifier tab on top. Right now if they want to add the qualifier they have to check the qualifier visibility check box that is published. This turns on a group with the text and bar and then type their text. In an attempt to streamline this, I am wondering if there is a script that if nothing is typed in the field the group will be off/on if anything is in the field.

    Thanks


  • 2.  RE: Layer visibility based on Text

    Posted 05-14-2016 00:09

    I've accomplished something similar with Visual Logic. Link the "text" parameter of your text layer to String1 of a String Compare block and a Value of 1 to String2, then Link the String Compare output "Greater" to the visibility of your group. I'm working in Xpression Designer V5.5, so you may have to adjust for a newer version.


    #XPression


  • 3.  RE: Layer visibility based on Text

    Posted 05-17-2016 16:41

    dim word as xptextobject
    dim box as xpbaseobject

    self.getobjectbyname ("word", word)
    self.getobjectbyname ("box", box)

    if word.text="" then
    box.visible=false
    else box.visible=true

    end if

    And have the box layer turned off from the object manager


    #XPression