• No results found

General Reporter Editor Script Commands

In document scriptingMaxwell_onlinehelp (Page 194-200)

Following are reporter script commands recognized by the oDesign module:

AddCartesianXMarker

AddDeltaMarker

CopyReportDefinition

CopyTraceData

CopyTraceDefinition

CreateReport

CreateReportFromTemplate

DeleteAllReports

UpdateTracesContextAndSweeps

AddCartesianXMarker

Use: Adds a marker to a report on the X axis.

Command: Report2D>Marker>Add X Marker

Syntax: AddCartesianXMarker <ReportName>, <MarkerID>, <Xcoord>

Return Value: None

Parameters: <ReportName>

Type: <string>

Name of Report.

<MarkerID>

Type: <string>

ID of the marker, for example: “M1”.

<XCoord>

Type: <real>

X location for the marker.

Example:

oModule.AddCartesianXMarker "XY Plot1", "MX1", 0

AddDeltaMarker

Use: Add markers to calculate differences between two trace points on a plot.

Command: Report2D>Marker>Add Delta Marker

Syntax: AddDeltaMarker <ReportName>, <MarkerID_1>, <TraceID_1>,

<Xcoord_1>, <MarkerID_2>, <TraceID_2> <Xcoord_2>

Return Value: None

ID for the markers.

<TraceID>

Type: <string>

Typically given by expression plus solution name plus coordinate system type.

<XCoord>

Type: <real>

X location for the marker.

Example:

oModule.AddDeltaMarker "XY Plot 1",

"m3", "dB(S(LumpPort1 LumpPort1)) : Setup1 : Sweep1 : Cartesian", _ "3.22GHz", _

"m4", "dB(S(LumpPort1 LumpPort1)) : Setup1 : Sweep1 : Cartesian",_ "3.93GHz"

AddMarker

Use: Adds a marker to a trace on a report.

Command: Report2D>Marker>Add Marker

Syntax: AddMarker <ReportName>, <MarkerID>, <TraceID>, <Xcoord>, Return Value: None

ID for the marker.

<TraceID>

Type: <string>

Typically given by expression plus solution name plus coordinate system type.

<XCoord>

Type: <real>

X location for the marker.

Example:

Set oModule = oDesign.GetModule("ReportSetup") oModule.AddMarker "XY Plot1", "m1", _

"mag(S(Port1 Port1)) : Setup1 : LastAdaptive : Carte-sian", "0.3in"

AddNote

Use: Adds a note at a specified location to a given report.

Command: Right-click on the plot and select Add Note Syntax: AddNote <ReportName> <NoteDataArray>) Return Value: None

<NoteDataName>

Set oModule = oDesign.GetModule("ReportSetup")

oModule.AddNote "XY Plot1", Array("NAME:NoteDataSource", Array("NAME:NoteDataSource", "SourceName:=", "Note1",

"HaveDefaultPos:=", true, "DefaultXPos:=", 1996,

"DefaultYPos:=", _ 3177, "String:=", "This is a note"))

AddTraces

Use: Creates a new trace and adds it to the specified report.

Command: Modify Report>Add Trace

Syntax: AddTraces <ReportName>, <SolutionName>,

<SimulatedValueContextArray>, <PointSetDefinitionArray>,

Name of the solution as listed in the Modify Report dialog box.

For example: "Setup1 : Last Adaptive"

<SimulatedValueContextArray>

Type: Array of strings

Context for which the expression is being evaluated. This can be an empty string if there is no context.

Array(“Domain:=”, <DomainType>)

<DomainType>

ex. “Sweep” or “Time”

Array(“Context:=”, <GeometryType>)

<GeometryType>

ex. “Infinite Spheren”, “Spheren”, “Polylinen”

<FamiliesArray>

Type: Array of strings

Contains sweep definitions for the report.

Array(“<VariableName>:= “, <ValueArray>)

<ValueArray>

Array(“All”) or Array(“Value1”, “Value2”, ...”Valuen”) examples of <VariableName>

“Freq”, “Theta”, “Distance”

<ReportDataArray>

Type: Array of strings

This array contains the report quantity and X, Y, and (Z) axis definitions.

Array(“X Component:=”, <VariableName>, “Y Component:=”, <Variable-Name> | <ReportQuantityArray>)

<ReportQuantityArray>

ex. Array(“dB(S(Port1, Port1))”)

Example: oModule.AddTraces "XY Plot1", "Setup1 : Sweep1", _

Array("Domain:=", "Time", "HoldTime:=", 1, "RiseTime:=", 0, _

"StepTime:=", 6.24999373748E-012, "Step:=", false, _

"WindowWidth:=", 1, _

"WindowType:=", 0, "KaiserParameter:=", 1, _

"MaximumTime:=", 6.2437437437444E-009), _

Array("Time:=", Array("All"), "OverridingValues:=", Array("0s", _ "6.24999373748188e-012s", ... )), Array("X Component:=", "Time", _

"Y Component:=", Array("TDRZ(WavePort1)")), _ Array()

ClearAllMarkers

Use: Clears all markers from a report.

Command: Report2d>Markers>ClearAllMarkers Syntax: ClearAllMarkers <ReportName>

Return Value: None

Parameters: <ReportName>

Type: <string>

Name of Report.

Example: oModule.ClearAllMarkers "XY Plot 1"

CopyTracesData

Use: Copy trace data for a paste operation.

Command: Select a trace in the Project tree, right-click and select Copy Data Syntax: CopyTracesData <ReportName> <TracesArray>)

Return Value: None

Parameters: <ReportName>

Type: <string>

Name of Report.

<TracesArray>

Type: Array of Strings

Trace definitions from which to copy corresponding data.

Example:

oModule.CopyTracesData "XY Plot 1", Array("magforce")

CopyReportData

Use: Copy all data corresponding to the specified reports.

Command: Select a report in the Project tree, right-click and select Copy Data Syntax: CopyReportData <ReportsArray>

Return Value: None

Parameters: <ReportsArray>

Type: Array of strings

Names of reports from which to copy data.

Example:

oModule.CopyReportData Array("XY Plot 1")

CopyReportDefinitions

Use: Copy the definition of a report for paste operations.

Command: Select a report in the Project tree, right-click and select Copy Definition Syntax: CopyReportDefinitions <ReportsArray>

Return Value: None

Parameters: <ReportsArray>

Type: Array of strings

Names of reports from which to copy the definitions.

Example:

oModule.CopyReportDefinitions Array("XY Plot 1")

CopyTraceDefinitions

Use: Copy trace definitions for a paste operation.

Command: Select a trace in the Project tree, right-click and select Copy Definition Syntax: CopyTraceDefinitions <ReportName> <TracesArray>

Return Value: None

Parameters: <ReportName>

Type: <string>

Name of Report.

<TracesArray>

Type: Array of strings.

Trace definitions to copy.

Example:

oModule.CopyTraceDefinitions "XY Plot 1", Array("mag-force")

CreateReport

Use: Creates a new report with a single trace and adds it to the Results branch in the project tree. To add more traces, use the AddTraces command. To edit the display properties, use the ChangeProperty Script command.

Command: Maxwell2D or Maxwell3D>Results>Create<type> Report

Syntax: CreateReport <ReportName> <ReportType> <DisplayType>

<SolutionName> <ContextArray>

In document scriptingMaxwell_onlinehelp (Page 194-200)

Related documents