Saltar navegación

Topic

Variable in signal path

Página de inicio ' Community ' FPScript ' Variable en la ruta de la señal

Viendo los mensajes de 2 - 1 a 2 (de 2 en total)
  • Autor
    Puestos
  • #33632
    HerveM1234
    Participante

    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
    Keymaster

    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.

Viendo los mensajes de 2 - 1 a 2 (de 2 en total)
  • Debes estar registrado para responder a este tema.