Announcement

Collapse
No announcement yet.

DataCondition Argumetns

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • DataCondition Argumetns

    Hi,

    Does anyone know if we can add multiple arguments in DataCondition plugin?


    If there is, what's the syntax?

    I've tried comma, semicolon and space.

    Basically I want to use data condition like below:

    <CODE>
    If a > b && a > c then
    ....code....
    else
    .....code....
    end if
    <CODE>

    Thanks.

  • #2
    I haven't worked with Data Condition for a while and will have a look,
    But in the meantime why not use viz script for this?

    Here is an example based on your post .
    Paste this code in a viz script plugin and compile,
    Open console and play with the values to see the outcome, and how it works.

    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    sub OnInitParameters()
    RegisterParameterString("a","a","",100,100,"")
    RegisterParameterString("b","b","",100,100,"")
    RegisterParameterString("c","c","",100,100,"")
    end sub


    sub OnInit()

    end sub

    sub OnParameterChanged(parameterName As String)

    if parameterName = "a" then
    ProcessValues()
    elseif parameterName = "b" then
    ProcessValues()
    elseif parameterName = "c" then
    ProcessValues()
    end if
    end sub

    Sub ProcessValues()
    if CDbl(GetParameterString("a")) > CDbl(GetParameterString("b")) and CDbl(GetParameterString("a")) > CDbl(GetParameterString("c")) then
    println "A is more than B and C"
    else
    println "A is not more than B and C"
    end if
    End Sub
    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

    Comment


    • #3
      Thanks Novacane89!

      You're correct. I did decide to use a script instead. Similar to what you sent, comparing the values and activating a container.

      I appreciate the feedback.

      Comment


      • #4
        Glad it worked for you . My pleasure

        Comment

        Working...
        X