Forum FlexPro – Discuss your topic!

Variable in signal path

Home > Community > FPScript > Variable in signal path

Ansicht von 2 Beiträgen - 1 bis 2 (von insgesamt 2)
  • Autor
    Beiträge
  • #16207
    HerveM1234HerveM1234
    Teilnehmer

    Hi,

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

    ie :

    Result = MyFunction(‘FolderA\Signal1’)

    works fine

    but

    Dim Fld = “FolderA\”

    Result = MyFunction(Fld :: Signal1)

    doesn’t work –> syntax problem

    Thanks for Help

    #16209
    Bernhard KantzBernhard Kantz
    Teilnehmer

    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.

Ansicht von 2 Beiträgen - 1 bis 2 (von insgesamt 2)
  • Du musst angemeldet sein, um auf dieses Thema antworten zu können.