Public Member Functions | List of all members
ResultTable Class Reference

ResultTable class is used for result tables.
The class can be called from Study class.
. More...

Public Member Functions

ResultTableDataGetData (Variant &val)
 Specifies the name or index, and then obtains the ResultTableData object. More...
 
ResultTableDataGetDataFromName (String &typeName, String &sourceTitle=String())
 Specifies the name, and then obtains the ResultTableData object. More...
 
bool IsValid ()
 Returns True if an object is valid. More...
 
int NumTables ()
 Returns the number of result tables as an integer. More...
 
void SetComplexComponent (String &name)
 Specifies the complex number of a result. More...
 
void SetXYZComponent (String &name)
 Specifies the component for a result (absolute value, X, Y, Z). More...
 
void WriteAllCaseCurrentStep (String &filename, String &type, int step)
 Exports all the data in the results table of the specified step to a file for the all cases. More...
 
void WriteAllCaseSummary (String &filename, String &summarytype, int fromstep, int tostep)
 Exports all the totaled results table data to a file for the all cases. More...
 
void WriteAllCaseTables (String &filename, String &type)
 Exports all the data in the results table to the file for the all cases. More...
 
void WriteAllCurrentStep (String &filename, String &type, int step)
 Exports all the data in the results table of the specified step to a file. More...
 
void WriteAllSummary (String &filename, String &summarytype, int fromstep, int tostep)
 Exports all the totaled result table data table to a file. More...
 
void WriteAllTables (String &filename, String &type)
 Exports all the data in the results table to a file. More...
 

Detailed Description

ResultTable class is used for result tables.
The class can be called from Study class.
.

Example of calling the class object:

app.GetModel(0).GetStudy(0).GetResultTable()

Member Function Documentation

ResultTableData * ResultTable::GetData ( Variant &  val)

Specifies the name or index, and then obtains the ResultTableData object.

Parameters
valResult table name/Result table index
Returns
ResultTableData object
Sample1
Set app = CreateObject("designer.Application")
Call app.GetModel(0).GetStudy(0).GetResultTable().GetData("LineCurrent").WriteTable("D:\currents.csv", "Frequency")
Sample2 (Python)(Obtaining the imaginary part)
import designer
app = designer.GetApplication()
tabledata = app.GetModel(0).GetStudy(0).GetResultTable().GetData("TerminalVoltage")
tabledata.SetComponent("Imaginary")
print tabledata.GetValue(0,0)

For more information about the commands for the analysis result type, see Properties for the Table Display.

ResultTableData * ResultTable::GetDataFromName ( String &  typeName,
String &  sourceTitle = String() 
)

Specifies the name, and then obtains the ResultTableData object.

Parameters
typeNameResult table name
sourceTitleTitle of the slice, when using a multi slice condition.
Returns
ResultTableData object
Sample
Set app = CreateObject("designer.Application")
Call app.GetModel(0).GetStudy(0).GetResultTable().GetDataFromName("Torque", " <Slice 2>").WriteTable("D:\currents.csv", "Frequency")

For more information about the commands for the analysis result type, see Properties for the Table Display.

bool ResultTable::IsValid ( )

Returns True if an object is valid.

Returns
Whether or not the ResultTable objects in the list are valid
int ResultTable::NumTables ( )

Returns the number of result tables as an integer.

Returns
Number of result tables
void ResultTable::SetComplexComponent ( String &  name)

Specifies the complex number of a result.

Parameters
name
Complex number name
Real : Real part
Imaginary : Imaginary part
  • This command affects objects that are defined with the "Set" command (in this case, tables). Define the tables with the "Set" command before using this command.
  • For more information see the example in " SetXYZComponent ".
void ResultTable::SetXYZComponent ( String &  name)

Specifies the component for a result (absolute value, X, Y, Z).

Parameters
name
Component name
Absolute : Absolute value
X : X-component
Y : Y-component
Z : Z-component
  • This command affects objects that are defined with the "Set" command (in this case, tables). Define the tables with the "Set" command before using this command.

Example: When this command is in effect

Set table = app.GetModel(*).GetStudy(*).GetResultTable()
Call table.SetXYZComponent("X")
Call table.WriteAllTables(**)

Example: Command has no effect

Call app.GetModel(*).GetStudy(*).SetXYZComponent("X")
Call app.GetModel(*).GetStudy(*).WriteAllTables(**)
void ResultTable::WriteAllCaseCurrentStep ( String &  filename,
String &  type,
int  step 
)

Exports all the data in the results table of the specified step to a file for the all cases.

Parameters
filenameFile name
type
Axis type
Angle : Angle
Distance : Distance
Time : Time
stepStep
void ResultTable::WriteAllCaseSummary ( String &  filename,
String &  summarytype,
int  fromstep,
int  tostep 
)

Exports all the totaled results table data to a file for the all cases.

Parameters
filenameFile name of destination folder
summarytype
Totaling method
Average : Average value
RMS : RMS (root mean square)
Maximum : Maximum value
Minimum : Minimum value
Sum: Total sum
fromstepNumber of start steps
tostepNumber of end steps
void ResultTable::WriteAllCaseTables ( String &  filename,
String &  type 
)

Exports all the data in the results table to the file for the all cases.

Parameters
filenameFile name
type
Axis type
Angle : Angle
Distance : Distance
Time : Time
void ResultTable::WriteAllCurrentStep ( String &  filename,
String &  type,
int  step 
)

Exports all the data in the results table of the specified step to a file.

Parameters
filenameDestination file name
type
Axis type
Angle : Angle
Distance : Distance
Time : Time
stepStep
void ResultTable::WriteAllSummary ( String &  filename,
String &  summarytype,
int  fromstep,
int  tostep 
)

Exports all the totaled result table data table to a file.

Parameters
filenameDestination file name
summarytype
Totaling method
Average : Average value
RMS : RMS (root mean square)
Maximum : Maximum value
Minimum : Minimum value
Sum: Total sum
fromstepNumber of start steps
tostepNumber of end steps
void ResultTable::WriteAllTables ( String &  filename,
String &  type 
)

Exports all the data in the results table to a file.

Parameters
filenameFile name
type
Axis type
Angle : Angle
Distance : Distance
Time : Time