Thanks again. The Code works very well, but now I am running into another problem I don`t understand regarding Metadata Access. It came up, when I tried to update my legend. I am having 7 UserParameters in my worksheet and wrote the following code to demonstrate the problem. I am trying to access the data in two different ways. My goal is to set my legend as explained earlier (Version2). Version1 I implemented to check if I did anything wrong during metadata import: I start with the uotput I see when I execute the script:
Version 1 works fine
Temperatur = 25
Version 2 shows UserParamater1 or Worksheetname instead of UserParamater7
Temperatur = 52190w01
string str$,strParName$;
int idx;
// Range of my Worksheet I am looking at ...
range p=[Scans1]52190w01!;
// Index of UserParameter
idx=7;
// Access UserParameterName and Value Version 1
type Version 1 works fine;
type p.userparam$(idx)$ + " = " + [Scans1]52190w01!col(4)[D$(idx)]$;
// Access UserParameterName and Value Version 2, which I need to update the Legend of my Graph.
// During Script execution the diagram is open in which the first Layer graphs Data:[Scans1]52190w01!col(4)
type Version 2 shows UserParamater1 or Worksheetname instead of UserParamater7;
strParName$ = p.userparam$(idx)$;
str$ ="%(strParName$) = %(1,@LD$(idx))";
type str$;
The problem is only present for UserParameter7 . All other Parameters work fine with both versions. What am I doing wrong?
Best Regards
Morten