07-16-2008 12:59 PM
07-18-2008 12:28 AM
07-18-2008 07:15 AM
Thanks for the info. I will have to write a script, I guess.
SUGGESTION BOX ITEM: A lot of places in DIAdem force you to set properties one at a time, on similar items, even when you want to make the same property changes. NI should fix this if it can. Also, setting up defaults in various DIAdem panels, like the one I mentioned to start this thread, is a little sketchy.
Thanks again for the script help file pointer. I'll be scripting today!
07-18-2008 08:48 AM
I also have been frustrated with this, as I often like to change parameters for many curves in VIEW and REPORT. So, I have custom scripts that either detect the currently selected axis in REPORT (area in VIEW), or everything, and just change the color/line/marker properties via a script. For example, this will add markers to every curve in every area in the active sheet in VIEW:
Dim oMyArea, oMyCurve
For Each oMyArea in View.ActiveSheet.Areas
oMyArea.Active = True
For Each oMyCurve in oMyArea.DisplayObj.Curves
oMyCurve.MarkerType ="square"
oMyCurve.MarkerLineWidth ="min"
oMyCurve.MarkerSize =3
oMyCurve.MarkerColorAuto =true
oMyCurve.MarkerColor ="black"
oMyCurve.MarkerColorRGB =0
oMyCurve.MarkerFillColorAuto =false
oMyCurve.MarkerFillColor =""
oMyCurve.MarkerFillColorRGB =0
oMyCurve.MarkerFrequencyMode ="CalcNPoint"
oMyCurve.MarkerIntervalPoints =1
oMyCurve.MarkerIntervalLength =1
oMyCurve.MarkerAtBegin =false
oMyCurve.MarkerAtEnd =false
Next
Next
call wndshow("VIEW")
07-18-2008 08:57 AM
07-18-2008 12:05 PM - edited 07-18-2008 12:08 PM
02-11-2010 11:53 AM
Hi Julia,
Im having issues applying just a line thinckness to all curves in my REPORT. So heres the story,
I call the Export to PDF tool from labview for each measurement I do. Every measurement has a slightly different report layout that I load from independent files, I use a script once the data has loaded into the report to adjust a fer parameters like the axis. Please see code:
Call GraphObjOpen("2D-Axis1")
Call GraphObjOpen("2DXAxis8_1")
D2AxisXDivMode = "linear"
D2AxisXScaleType = "manual"
D2AxisXBegin = 20
D2AxisXEnd = 20000
D2AxisXOrigin = 20
D2AxisXTick = 1
D2AxisXMiniTick = 4
Call GraphObjClose("2DXAxis8_1")
Call GraphObjOpen("2DYAxis8_1")
D2AxisYDivMode = "linear"
D2AxisYScaleType = "manual"
D2AxisYBegin = -60
D2AxisYEnd = 10
D2AxisYOrigin = -60
D2AxisYTick = 1
D2AxisYMiniTick = 1
Call GraphObjClose("2DYAxis8_1")
Call GraphObjOpen("2DObj2_Curve1")
D2CURVELINEWIDTH = 1
Call GraphObjOpen("2DObj2_Curve1")
Call GraphObjOpen("2DObj2_Curve2")
D2CURVELINEWIDTH = 1
Call GraphObjOpen("2DObj2_Curve2")
Call GraphObjClose("2D-Axis1")
Towards the end of the script I programatically enter in CurveLineWidth adjustments to rectify my lines, but there is a problem. each report seems to use different object namesso I often get the error message: Object "2DObj2_Curve1" unknown or not open. Obviously..
Is there any way to do a "foreach" method like in your previously posted example without using the specific object names???
Or does any other method come to mind???
Help is highly appreciated...
AL.
09-26-2011 02:30 AM
Also from me a big thanks, as this worked like a charm for me 🙂