Announcement

Collapse
No announcement yet.

Control Parameter Clear

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

  • Control Parameter Clear

    I am trying to clear the Control Parameter plugin with VizId with a script in TL. I can get the parameter with this: this.getFunctionPluginInstance("ControlParameter").getParameterString("input") but how do i clear it?

    I am getting an error using the following:

    System.SendCommand("#" & GetParameterContainer("TargetControlParameterContainer").VizId & "*FUNCTION*ControlParameter*input SET ") It seems to find the incorrect VizId so i dont know what i am missing.

    I can clear it with an action keyframe but that does not work well in TL, it always clears the incoming instead of the outgoing.

    Below is the script i got from a user. I just need the CLEAR button to clear the file path input value. I have it working for the data reader but cant seem to find the terminology for the Control Parameter.

    sub OnInitParameters()
    RegisterPushButton("SetNewFileName","SetNewFileName",1)
    RegisterParameterContainer("TargetDataReaderContainer","TargetDataReaderContainer")
    RegisterParameterString("filePath","File Path","C:\\data.xlsx",30,100,"")
    RegisterPushButton("DataReaderLOAD","Load Data",2)
    RegisterPlugin("DataReaderPathSetter_And_Loader")
    RegisterPushButton("Clear","Clear",3)
    RegisterInfoText("1-Drag container with datareader into this contaiener slot\n2-Set File Path ***.xlsx\n3-Animate button SetNewFileName and LoadData.\nIf Callup scene for transition logic make sure director name is Default where buttons are animated")
    end sub

    sub OnExecAction(buttonId As Integer)
    dim Clear as string
    dim CC as string

    CC = " "

    if buttonId = 1 then
    System.SendCommand("#" & GetParameterContainer("TargetDataReaderContainer").VizId & "*FUNCTION*DataReader*filename SET " & GetParameterString("filePath"))

    elseif buttonId = 2 then
    System.SendCommand("#" & GetParameterContainer("TargetDataReaderContainer").VizId & "*FUNCTION*DataReader*load INVOKE")

    elseif buttonId = 3 then
    System.SendCommand("#" & GetParameterContainer("TargetDataReaderContainer").VizId & "*FUNCTION*DataReader*filename SET ")
    'System.SendCommand(this.GetFunctionPluginInstance("ControlParameter").setParameterString("input")
    'System.SendCommand("#" & GetParameterContainer("TargetControlParameterContainer").VizId & "*FUNCTION*ControlParameter*input SET ")

    'Clear = this.getFunctionPluginInstance("ControlParameter").getParameterString("input")
    'Clear = this.getFunctionPluginInstance("ControlParameter").setParameterString("")

    'println Clear

    end if
    end sub

    Cheers,
    Shotski

    DataReaderPathSetter.PNG

    Attached Files

  • #2
    You can use "SetParameter instead of GetParameter...
    Example
    '"
    this.getFunctionPluginInstance("ControlParameter").SetParameterString("input","")
    'SetParameterString("input","Whatever text you want to put in here.. above i used 2 quotes to signify an empty space")
    '"

    Comment


    • #3
      Novacane,

      Thanks again for your help.

      Comment

      Working...
      X