05-04-2011 01:05 AM
Hi all,
I have 2 text boxes start and target ready on my report. I need one of my channel minimum value and the other channels max value to dispaly automatically in start and target box respectively.
How do i go about it?
Rsh
Solved! Go to Solution.
05-04-2011 08:14 AM
Hello Rsh,
There a a few different ways to achieve this:
Let's assume you have a channel called "Speed" in group 1 in the DataPortal:
Type: Maximum: @@CMax("[1]/Speed")@@ into a text box. For the minimum value, use CMin instead of CMax.
Or, even easier, click on the channel you are interested in in the DataPortal. Then select the property you wish to display in the report. After clicking on the propert, drag and drop it into the REPORT window, it will automatically populate a text with the property name and variable value, it even adds automatic formatting. For the example below, it will add the following text to the report:
Maximum: @@Str(Data.GetChannel("[1]/Speed").Properties("maximum").Value, "AutoAdj")@@
I hope that helps. Ask if you have additional questions,
Otmar
05-04-2011 09:47 PM
Hi Otmar,
Thanks you. Its so simple.
Now, how can i limit the decimal points to 2 digits, say for example we use d.dd . How can i use it here??
RSH
05-05-2011 09:42 AM
Hello RSH,
Now, how can I limit the decimal points to 2 digits, say for example we use d.dd . How can I use it here??
You can simply convert the variables to a string and format that string using the str function in DIAdem.
Here is an example for your specific request:
Maximum: @@str(CMax("[1]/Speed"),"d.dd")@@
I hope that helps.
Otmar
08-09-2011 11:20 AM
Otmar,
Can you help me with a similar question?
Your response in this thread is helpful in getting this to work, but I would prefer a more general solution so I could code this up for mass processing. By Dragging and Dropping the property into report I get the following:
Maximum: @@Str(Data.GetChannel("[1]/L1-LCRB604-CFC_60").Properties("maximum").Value)@@
Which is great. Except, I have three plots on the page, and I am hoping for a more fundamental way to refer to the data plotted in each of the 2-D axis systems. Instead of "[1]/L1-LCRB604-CFC_60" I am hoping to refer to the channel as "the data that is plotted in this 2-D axis system" or "the channel that is plotted in the first 2-D Axis System". I see that the Axes use the CurrChnNo variable but that doesnt seem to work (how would diadem know which of the three on the page I am talking about?). I may be able to use the "#" character, but I am having problems getting help on this since the help file wont allow me to search this.
Thanks,
Jason
08-09-2011 02:59 PM
Hello Jason,
There is an easy way to do this, and there is a more involved way to do this. I am hoping the "easy" way will solve your question, so I don't have to think about the solution that involves a little more effort:
Starting with DIAdem 2010 there is a way to add properties to the legend (see image below) of any axis system. What I did for this example was to simply add the legend for the 2D graph (that's a simple check box in the "Curve and Axis definition" dialog, and then dragged the maximum value of any channel onto the legend. It will automatically add a new column to the legend table and display the maximum (or any other channel property) in the legend. This of course works separately for each axis system on a page.
Starting with DIAdem 2011 there is a new "Curve Snippet" function that allows to create tables such as the one shown in the image below. Please have a look at the DIAdem 2011 example called "2D Tables as Legend and Legend for Axis System Labeling" to see how this was done, it's a little more effort, but it also adds extra flexibility:
Do either of these look like a workable solution for you?
Best regards,
Otmar
08-09-2011 03:58 PM
Hi Otmar,
Your response was definitely helpful. I am downloading Diadem 2011 now to try this. I had been using Diadem 11.1.
Your example with the CurveSnippet is closer to where I want to be. Since I now realize I want to include the time that the maximums and the minimums occur, I had started to write a script to use the ChnTMinTMaxCalc function to calculate the maximum and minimum times and add them as properties to each channel. But I am hoping that these might be available in CurveSnippet tool and/or a newer version (I am hoping at least--althought the script should be relatively easy).
It seems that the CurveSnippet Tool is using the GraphObjChnNameGet function which is really what i want. It seems that with this function (if my assumption on how it works is right) will allow me to determine which channel is plotted so I can use that for other information. If this is the case, I should have no problems.
I will update and let you know. Thanks again.
Jason