Skip navigation

Account settings

Topic

Variable in signal path

Home page Community FPScript Variable in signal path

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #33632
    HerveM1234
    Participant

    Hi,

    I would like to use a variable instead of the path name when calling a function.

    ie :

    Result = MyFunction(‘FolderASignal1’)

    works fine

    but

    Dim Fld = “FolderA”

    Result = MyFunction(Fld :: Signal1)

    doesn’t work –> syntax problem

    Thanks for Help

    #33633
    Bernhard Kantz
    Participant

    You can use the indirection operator $string-expression$ to access an FlexPro object from its (path) name given as a string:

    Dim Fld = "FolderA\"
    $Fld : "Signal1"$

    accesses the object ‘Signal1’ in ‘FolderA’ relative to the path of the formula containing the expression. Note the double backslash, it is necessary because the acts as escape character.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.