DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Legend Drawing

Hi
   I would like to restrict certain curves or data markings programmatically, from being listed in the "Legend" ...I was able to be this manually but couldnot succeed doing it programmatically ... If i am not wrong below listed variable sets the curve on the legend but this did not work out for me...
                                                                                D2CURVELEGDRAWT(1)="yes"

                                D2CURVELEGDRAWT(2)="no"

I would be really glad to get some suggestion from you'll on this...
 
Regards
Andrew
0 Kudos
Message 1 of 6
(4,048 Views)
Hi Andrew: You would have to use the Remove command to delete the item off the VIEW panel. The object will be created by default and then can be removed using the command below: Method: Remove for LegendItems Deletes the specified object in the DIAdem VIEW panel. Syntax P1 = Object.Remove(P2) Parameters Object Executing object. P1 Boolean. The value is TRUE if the operation was successful. P2 Text. Specifies the name of the object that is to be deleted. Example The following example deletes a legend entry: View.ActiveSheet.ActiveArea.DisplayObj.LegendItems.Remove("Name") Thank you Nandini NI
0 Kudos
Message 2 of 6
(4,038 Views)

Hi Nandini

               I am working on DIAdem REPORT panel and not on VIEW panel...

Warm Regards

Andrew

0 Kudos
Message 3 of 6
(4,038 Views)

Hi Andrew,

You need to first open up the 2D-Axis object before you can set those legend properties.  If you left-click on the 2D-Axis you're interested in REPORT and look in the far lower-left-hand corner of DIAdem, you will see the name of the 2D-Axis displayed.  Use this name instead of the "AxisName" in the below code snippet to set your legend display programmatically:

Call GRAPHObjOpen("AxisName")
  FOR i = 1 TO CurveNoMax
    D2CurveLegDrawT(i) = "yes"
  NEXT ' i
  D2CurveLegDrawT(1) = "no"
Call GRAPHObjClose("AxisName")

Ask if you have further questions,
Brad Turpin
DIAdem Product Support Enginee
National Instruments

0 Kudos
Message 4 of 6
(4,024 Views)

Hi Brad

           I have a another query here...Is there any option restrict differential curves being listed in the legend.

Regards

Andrew

0 Kudos
Message 5 of 6
(4,017 Views)
Hi AndrewPhilip,
 
This sounds like the same query, not a new one.  By "...is there any option restrict differential curves being listed in the legend", do you mean "...is there any option to restrict different curves..."?  Or do you want to restrict legend listing for all curves of type "differential"?  If so, what do you mean by "differential"?
 
At any rate, the only way to restrict channels showing up in the legend is to do what we just discussed in the last couple of forum entries-- by choosing "yes" or "no" for each curve.
 
Brad Turpin
DIAdem Product Support Engineer
National Instruments
0 Kudos
Message 6 of 6
(4,007 Views)