Graphics

 View Only
  • 1.  Adding prefix to incrementing number

    Posted 02-15-2023 06:48

    Hi,

    I have a button in Dashboard that increments by the value of one each time it is pressed. How can I add a constant letter to the front of that number, so the number will constantly change when the button is pushed, but the letter remains the same?

    Thank you



    ------------------------------
    Brad Howard
    ------------------------------


  • 2.  RE: Adding prefix to incrementing number

    Posted 02-15-2023 07:25

    Probably easier just to do that in XPression as you can prefix the data with a letter on the datalinq connection 



    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------



  • 3.  RE: Adding prefix to incrementing number

    Posted 02-15-2023 07:50

    Ah that would be awesome if i was using Xpression 10, but unfortunately i am on Xpression 7, it doesn't have that append feature.



    ------------------------------
    Brad Howard
    ------------------------------



  • 4.  RE: Adding prefix to incrementing number

    Posted 02-15-2023 08:53

    You can use visual logic to that if you are familiar with it? 



    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------



  • 5.  RE: Adding prefix to incrementing number

    Posted 02-15-2023 10:06

    I am familiar enough with it to know how to use it, except i don't know which function block to use. Is it within Strings?



    ------------------------------
    Brad
    ------------------------------



  • 6.  RE: Adding prefix to incrementing number

    Posted 02-16-2023 05:31



    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------



  • 7.  RE: Adding prefix to incrementing number

    Posted 02-17-2023 08:58

    Hi Simon,

    So I followed your diagram, but no luck. 

    What do you think I am missing? I am using vers 7 so i think that is why i am not seeing the values under the function blocks, but i am not getting any change on my output text 1. Just the same number, 5 or whenever i change it, it remains with out the prefix. See images

    Cheers

    Brad



    ------------------------------
    Brad Howard
    ------------------------------



  • 8.  RE: Adding prefix to incrementing number

    Posted 02-18-2023 01:12

    give this script a try. You would add it to the text object that holds the number from your dashboard. I'm not at my xpression right now so this is just off the top of my head.

    dim num, letter, letnum as xpTextObject

    scene.GetObjectByName("MyNum", num)
    scene.GetObjectByName("MyLetter", letter)
    scene.GetObjectByName("LetNumOut",letnum)

    letnum.Text = letter.Text & num.Text



  • 9.  RE: Adding prefix to incrementing number

    Posted 02-18-2023 01:37

    Or this. 



    ------------------------------
    Malcolm Thorpe
    Free Lance Xpression Designer/Carbonite TD
    ------------------------------



  • 10.  RE: Adding prefix to incrementing number

    Posted 02-20-2023 03:51

    Did you type the letter D into the string value or the description section of the VL block? 



    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------