1 Reply Latest reply on Nov 5, 2018 2:31 PM by David Hearn

    Executing AF attribute configuration string to get value(s) without having an actual attribute

    Mladen

      Hi,

       

      I would like to "execute" with AFSDK any attribute configuration string without having an actual attribute in AF.

       

      Is that possible? The only way I found so far is to create an attribute with the according data reference and config string I need and delete it afterwards.

       

      Of course, if there is such option provided by the sdk, there must be a way to tell where this "imaginary" attribute is located in order the relative paths for example to work.

       

      I know you will first ask "why do you need that", but I kindly ask if possible to focus on this particular scenario.

       

      One of the use cases is that we show the asset structure and the user needs to select an element from it and type and execute various of expressions (without creating an attribute for each expression he/she may want to execute).

       

      Thank you in advance!

        • Re: Executing AF attribute configuration string to get value(s) without having an actual attribute
          David Hearn

          You can create a dynamic attribute using any of the AFAttribute constuctor that accepts a PIPoint or configuration string and you will be able to get values for this dynamic attribute. But relative paths will not work because it does not exist within the hierarchy. You should be able to use absolute paths starting at the PISystem or AFDatabase.

           

          If you want to use relative paths, then you will have to create the attribute on the element within the hierarchy and then call UndoCheckout when it is no longer needed.

          2 of 2 people found this helpful