From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

access graph object from legend

Greetings,

 

I'm working with some authomatic reports and the graph legends can be quite helpful. So far, I've found how to access line information with variables like CurrChnNo (wich may be refered as #), CurrYChnNo, CurrXChnNo, allowing me to show maximum values with chnvalmax and so... but I would also like to read values like x or y axis begin and end (for instance, to write maximum as a % of the scale)

 

Is there any way to access this object variables from its own legend?

I know I could write the legend as a free text calculated when a script is executed, but then the text wouldn't change if the user changes the scale.

 

Thanks,

Tomás Lahoz

0 Kudos
Message 1 of 5
(4,252 Views)

Hi Tomas,

 

I think if you want to do things with that level of complexity, I'd recommend you employ a UserCommand that gets called every time that graph is refreshed.  What version of DIAdem are you using?  The commands to do this were updated with the REPORT object a few years ago.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 2 of 5
(4,243 Views)

Hi Brad, thanks for your reply.

 

Right now we're using DIAdem 2012, in a future I expect we'll migrate to DIAdem 2014, though.

0 Kudos
Message 3 of 5
(4,235 Views)

Hi tlahoz,

 

Check out the example "Using User Commands to Format a Date".  It shows how to set up a UserCommand to run each time the graph refreshes.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

Message 4 of 5
(4,229 Views)

Will do.

 

Thanks, Brad_Turpin!

0 Kudos
Message 5 of 5
(4,219 Views)