07-13-2015 07:01 AM
Hey everyone,
I'm a beginner with DIAdem Reports and close to despair as I didn't find any solution yet.
I wrote a script, that produces Reports of different measurements with 9 pages (3 2D-plots each, a total of 27 plots).
Now I want to set the beginning and end of the x axis of some specific plots.
First question: Does DIAdem offer something similar to an object browser (to easily access the names of the plot objects in a Report)?
I have created two GlobalDims called x_time_begin and x_time_end to define said properties, but I don't know how to access this variables in the Report (tried @@ ... @@ and @ ... @ at tab "axis parameters").
These variables change for every measurement, so each Report has a different set.
The Report layout is loaded from a set of .TDMS files and is not altered in the script.
How can I find the name of a specific plot in the Report to be able to access it?
Is it possible to define the range of the x axis by a variable at all?
Best regards,
Nils
Solved! Go to Solution.
07-14-2015 08:15 AM
Hi Nils,
It is possible to define the x-axis begging and end positions in scripting (see script below). When you create a report object in scripting you can name it whatever you want to access later. Otherwise I believe the default name is the name of the object followed by the number (for example the first 2D table is called "2DTable1")
Dim oMy2DAxisSystem, oMyXScaling Report.NewLayout Set oMy2DAxisSystem = Report.ActiveSheet.Objects.Add(eReportObject2DAxisSystem, "My2DAxisSystem") Set oMyXScaling = oMy2DAxisSystem.XAxis.Scaling oMyXScaling.AutoScalingType = eAxisAutoScalingManual oMyXScaling.Begin = 0.01 oMyXScaling.End = 100
Hope that helps,
Sadie
07-15-2015 03:06 AM
Hey Sadie,
Yes, that helped!
Thank you very much.