DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

alter axis properties in Report (set begin and end)

Solved!
Go to solution

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

0 Kudos
Message 1 of 3
(4,364 Views)
Solution
Accepted by topic author NiMand

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

Message 2 of 3
(4,317 Views)

Hey Sadie,

 

Yes, that helped!

Thank you very much.

0 Kudos
Message 3 of 3
(4,298 Views)