Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2024.
Loading...
Searching...
No Matches
SReportData Class Reference

Allow the storage of reporting data, used to fill a SReport. More...

Inheritance diagram for SReportData:
SComp

Public Types

enum  AngleUnit {
  Radian = 2 , Degree = 3 , Gradian = 4 , Percent = 5 ,
  Minute = 6 , Second = 7
}
 Angle units for SReportData. More...
 
enum  AreaUnit {
  SquareMicrometer = 2 , SquareMillimeter = 3 , SquareCentimeter = 4 , SquareMeter = 5 ,
  SquareKilometer = 6 , SquareMicroinch = 7 , SquareMilliinch = 8 , SquareInch = 9 ,
  SquareFeet = 10 , SquareSurveyFeet = 11 , SquareYard = 12 , SquareMiles = 13
}
 Area units for SReportData. More...
 
enum  LengthUnit {
  Micrometer = 2 , Millimeter = 3 , Centimeter = 4 , Meter = 5 ,
  Kilometer = 6 , Microinch = 7 , Milliinch = 8 , Inch = 9 ,
  Feet = 10 , SurveyFeet = 11 , Yard = 12 , Miles = 13
}
 Length units for SReportData. More...
 
enum  VolumeUnit {
  CubicMicrometer = 2 , CubicMillimeter = 3 , CubicCentimeter = 4 , CubicMeter = 5 ,
  CubicKilometer = 6 , CubicMicroinch = 7 , CubicMilliinch = 8 , CubicInch = 9 ,
  CubicFeet = 10 , CubicSurveyFeet = 11 , CubicYard = 12 , CubicMiles = 13 ,
  Liter = 14 , US_LiquidGallon = 15 , US_DryGallon = 16 , US_LiquidBarrel = 17 ,
  US_DryBarrel = 18 , US_OilBarrel = 19
}
 Volume units for SReportData. More...
 
- Public Types inherited from SComp
enum  VisibilityEnum { HIDDEN_ONLY = 0 , VISIBLE_ONLY = 1 , ANY_VISIBILITY = 2 }
 Visible criteria. More...
 

Public Member Functions

 AddAngle (string name, AngleUnit angleUnit, number angle)
 Add a data corresponding to an angle to a SReportData. More...
 
 AddArea (string name, AreaUnit areaUnit, number area)
 Add a data corresponding to an area to a SReportData. More...
 
 AddImage (string name, SImage image)
 Add a data corresponding to an internal image to a SReportData. More...
 
 AddImageFromDisk (string name, string imageFilePath)
 Add a data corresponding to an external image (provided its file path) to a SReportData. More...
 
Object AddLabels (string name, Array< SLabel > labelTable)
 Add a data corresponding to a table of labels to a SReportData. The labels table must contain labels with the same definition. More...
 
 AddLength (string name, LengthUnit lengthUnit, number length)
 Add a data corresponding to a length to a SReportData. More...
 
 AddNumber (string name, number number)
 Add a data corresponding to a number without unit to a SReportData. More...
 
 AddPoint (string name, LengthUnit lengthUnit, SPoint point)
 Add a data corresponding to a SPoint to a SReportData. More...
 
 AddText (string name, string text)
 Add a data corresponding to a text to a SReportData. More...
 
 AddToDoc ()
 Add the SReportData to the current document. More...
 
 AddVector (string name, LengthUnit lengthUnit, SVector vector)
 Add a data corresponding to a SVector to a SReportData. More...
 
 AddViewset (string name, SViewSet viewset)
 Add a data corresponding to a SViewSet to a SReportData. More...
 
 AddVolume (string name, VolumeUnit volumeUnit, number volume)
 Add a data corresponding to a volume to a SReportData. More...
 
 ExportDataXML (string filePath)
 Export all data as a XML file. More...
 
Object ExportTableCSV (string filesFolder)
 Export a table as a CSV file. More...
 
number GetAngle (string name)
 Get an angle from a SReportData. More...
 
number GetArea (string name)
 Get an area from a SReportData. More...
 
number GetLength (string name)
 Get a length from a SReportData. More...
 
number GetNumber (string name)
 Get a number from a SReportData. More...
 
SPoint GetPoint (string name)
 Get a SPoint from a SReportData. More...
 
string GetText (string key)
 Get a text from a SReportData. More...
 
SVector GetVector (string name)
 Get a SVector from a SReportData. More...
 
number GetVolume (string name)
 Get a volume from a SReportData. More...
 
 SReportData ()
 Default constructor. More...
 
 SReportData (string name)
 Create an empty SReportData. More...
 
string toString ()
 Get the type of the variable. More...
 
 UpdateMainViewSet ()
 Update the main view of the SReportData with the current 3D view. More...
 
string ValuesToString ()
 Get a debug string representation of the SReportData. More...
 
- Public Member Functions inherited from SComp
 AddToDoc ()
 Add the object to the document. More...
 
 ApplyTransformation (SMatrix matrix)
 Apply a geometric transformation to the current object by making a product with the given matrix. More...
 
Object GetBoundingBox (SMatrix ucs=null)
 Calculate the bounding box of the object. More...
 
Object GetColors ()
 Get the colors of the object. More...
 
string GetFolderName ()
 Get the name of the folder containing the object. More...
 
string GetName ()
 Return the object's name. More...
 
string GetPath ()
 Return the full path of a SComp in the tree. More...
 
 Invert ()
 Invert the normal of the object. More...
 
boolean IsInDoc ()
 Return if the object is in the document or not. More...
 
boolean IsVisible ()
 Get the visibility of the object. More...
 
 MoveToGroup (string groupPath, boolean moveInsideTopParent=true)
 Move the object to the document group represent by the given path. If some groups, in the path, don't exist, they will be created. More...
 
 RemoveFromDoc ()
 Remove the object from the document. More...
 
 SetClippable (boolean clipping)
 Set clippable or not. More...
 
 SetColors (number red, number green, number blue)
 Set the colors of the object. More...
 
 SetName (string objectName)
 Set the object's name. More...
 
 SetTransparency (number alpha)
 Set the transparency of the object. More...
 
 SetVisibility (boolean visible)
 Set the object to be visible, or not visible. More...
 
string toString ()
 Get the type of the variable. More...
 
 Translate (SVector vector)
 Make a translation of the current object with an SVector. More...
 

Static Public Member Functions

static Array< SReportDataFromName (string name)
 Search all the SReportData with the given name. More...
 
static Array< SReportDataFromSel ()
 Get all the selected SReportData. More...
 
static SReportData New (string name)
 Create an empty SReportData. More...
 
- Static Public Member Functions inherited from SComp
static Array< SCompAll (VisibilityEnum visCrit=SComp.ANY_VISIBILITY)
 Get all the SComp in the document. More...
 
static Object FromClick ()
 Launch an interaction to select a SComp in the scene. More...
 
static Array< SCompFromName (string name)
 Search all the SComp with the given name. More...
 
static Array< SCompFromSel ()
 Get all the selected SComp. More...
 

Detailed Description

Allow the storage of reporting data, used to fill a SReport.

Member Enumeration Documentation

◆ AngleUnit

Angle units for SReportData.

Enumerator
Radian 

Radian.

Degree 

Degree.

Gradian 

Gradian.

Percent 

Percent.

Minute 

Minute.

Second 

Second.

◆ AreaUnit

Area units for SReportData.

Enumerator
SquareMicrometer 

Square Micrometer.

SquareMillimeter 

Square Millimeter.

SquareCentimeter 

Square Centimeter.

SquareMeter 

Square Meter.

SquareKilometer 

Square Kilometer.

SquareMicroinch 

Square Microinch.

SquareMilliinch 

Square Milliinch.

SquareInch 

Square Inch.

SquareFeet 

Square Feet.

SquareSurveyFeet 

Square Survey Feet.

SquareYard 

Square Yard.

SquareMiles 

Square Miles.

◆ LengthUnit

Length units for SReportData.

Enumerator
Micrometer 

Micrometer.

Millimeter 

Millimeter.

Centimeter 

Centimeter.

Meter 

Meter.

Kilometer 

Kilometer.

Microinch 

Microinch.

Milliinch 

Milliinch.

Inch 

Inch.

Feet 

Feet.

SurveyFeet 

Survey Feet.

Yard 

Yard.

Miles 

Miles.

◆ VolumeUnit

Volume units for SReportData.

Enumerator
CubicMicrometer 

Cubic Micrometer.

CubicMillimeter 

Cubic Millimeter.

CubicCentimeter 

Cubic Centimeter.

CubicMeter 

Cubic Meter.

CubicKilometer 

Cubic Kilometer.

CubicMicroinch 

Cubic Microinch.

CubicMilliinch 

Cubic Milliinch.

CubicInch 

Cubic Inch.

CubicFeet 

Cubic Feet.

CubicSurveyFeet 

Cubic Survey Feet.

CubicYard 

Cubic Yard.

CubicMiles 

Cubic Miles.

Liter 

Liter.

US_LiquidGallon 

US Liquid Gallon.

US_DryGallon 

US Dry Gallon.

US_LiquidBarrel 

US Liquid Barrel.

US_DryBarrel 

US Dry Barrel.

US_OilBarrel 

US Oil Barrel.

Constructor & Destructor Documentation

◆ SReportData() [1/2]

SReportData::SReportData ( )

Default constructor.

◆ SReportData() [2/2]

SReportData::SReportData ( string  name)

Create an empty SReportData.

Parameters
name(string) The name of the created SReportData

Member Function Documentation

◆ AddAngle()

SReportData::AddAngle ( string  name,
AngleUnit  angleUnit,
number  angle 
)

Add a data corresponding to an angle to a SReportData.

Parameters
name(string) The name of the data
angleUnit(AngleUnit) The unit of the angle
angle(number) The value of the angle data

◆ AddArea()

SReportData::AddArea ( string  name,
AreaUnit  areaUnit,
number  area 
)

Add a data corresponding to an area to a SReportData.

Parameters
name(string) The name of the data
areaUnit(AreaUnit) The unit of the area
area(number) The value of the area data

◆ AddImage()

SReportData::AddImage ( string  name,
SImage  image 
)

Add a data corresponding to an internal image to a SReportData.

Parameters
name(string) The name of the data
image(SImage) The image object to add

◆ AddImageFromDisk()

SReportData::AddImageFromDisk ( string  name,
string  imageFilePath 
)

Add a data corresponding to an external image (provided its file path) to a SReportData.

Parameters
name(string) The name of the data
imageFilePath(string) The path to the image file

◆ AddLabels()

Object SReportData::AddLabels ( string  name,
Array< SLabel labelTable 
)

Add a data corresponding to a table of labels to a SReportData. The labels table must contain labels with the same definition.

Parameters
name(string) The name of the data
labelTable(Array<SLabel>) The table of labels to add
Return values
ret.ErrorCode(number) The error code
  • 0: No error
  • 1: Invalid labels table

◆ AddLength()

SReportData::AddLength ( string  name,
LengthUnit  lengthUnit,
number  length 
)

Add a data corresponding to a length to a SReportData.

Parameters
name(string) The name of the data
lengthUnit(LengthUnit) The unit of the length
length(number) The value of the length data

◆ AddNumber()

SReportData::AddNumber ( string  name,
number  number 
)

Add a data corresponding to a number without unit to a SReportData.

Parameters
name(string) The name of the data
number(number) The value of the data

◆ AddPoint()

SReportData::AddPoint ( string  name,
LengthUnit  lengthUnit,
SPoint  point 
)

Add a data corresponding to a SPoint to a SReportData.

Parameters
name(string) The name of the data
lengthUnit(LengthUnit) The unit of the SPoint coordinates
point(SPoint) The SPoint to add

◆ AddText()

SReportData::AddText ( string  name,
string  text 
)

Add a data corresponding to a text to a SReportData.

Parameters
name(string) The name of the data
text(string) The text to add

◆ AddToDoc()

SReportData::AddToDoc ( )

Add the SReportData to the current document.

◆ AddVector()

SReportData::AddVector ( string  name,
LengthUnit  lengthUnit,
SVector  vector 
)

Add a data corresponding to a SVector to a SReportData.

Parameters
name(string) The name of the data
lengthUnit(LengthUnit) The unit of the SVector coordinates
vector(SVector) The SVector to add

◆ AddViewset()

SReportData::AddViewset ( string  name,
SViewSet  viewset 
)

Add a data corresponding to a SViewSet to a SReportData.

Parameters
name(string) The name of the data
viewset(SViewSet) The SViewSet to add

◆ AddVolume()

SReportData::AddVolume ( string  name,
VolumeUnit  volumeUnit,
number  volume 
)

Add a data corresponding to a volume to a SReportData.

Parameters
name(string) The name of the data
volumeUnit(VolumeUnit) The unit of the volume
volume(number) The value of the volume data

◆ ExportDataXML()

SReportData::ExportDataXML ( string  filePath)

Export all data as a XML file.

Parameters
filePath(string) The complete path of the file

◆ ExportTableCSV()

Object SReportData::ExportTableCSV ( string  filesFolder)

Export a table as a CSV file.

Note
The path is the one of the folder where all CSV tables contained in the SReportData will be added. One CSV file will be created for each table inside the SReportData
Parameters
filesFolder(string) The path to the folder
Return values
ret.ErrorCode(number) The error code
  • 0: No error
  • 1: No available table to export in this report data
  • 2: Wrong folder path
  • 3: An error occurred
ret.FilesList(Array<string>) The list of all files path

◆ FromName()

static Array< SReportData > SReportData::FromName ( string  name)
static

Search all the SReportData with the given name.

Parameters
name(string) The name to find
Returns
(Array<SReportData>) All the SReportData with the given name

◆ FromSel()

static Array< SReportData > SReportData::FromSel ( )
static

Get all the selected SReportData.

Returns
(Array<SReportData>) All the selected SReportData

◆ GetAngle()

number SReportData::GetAngle ( string  name)

Get an angle from a SReportData.

Parameters
name(string) The name of the data to get
Returns
(number) The angle from the SReportData, with the given name

◆ GetArea()

number SReportData::GetArea ( string  name)

Get an area from a SReportData.

Parameters
name(string) The name of the data to get
Returns
(number) The area from the SReportData, with the given name

◆ GetLength()

number SReportData::GetLength ( string  name)

Get a length from a SReportData.

Parameters
name(string) The name of the data to get
Returns
(number) The length from the SReportData, with the given name

◆ GetNumber()

number SReportData::GetNumber ( string  name)

Get a number from a SReportData.

Parameters
name(string) The name of the data to get
Returns
(number) The number from the SReportData, with the given name

◆ GetPoint()

SPoint SReportData::GetPoint ( string  name)

Get a SPoint from a SReportData.

Parameters
name(string) The name of the data to get
Returns
(SPoint) The SPoint from the SReportData, with the given name

◆ GetText()

string SReportData::GetText ( string  key)

Get a text from a SReportData.

Parameters
key(string) The name of the data to get
Returns
(string) The text from the SReportData, with the given name

◆ GetVector()

SVector SReportData::GetVector ( string  name)

Get a SVector from a SReportData.

Parameters
name(string) The name of the data to get
Returns
(SVector) The SVector from the SReportData, with the given name

◆ GetVolume()

number SReportData::GetVolume ( string  name)

Get a volume from a SReportData.

Parameters
name(string) The name of the data to get
Returns
(number) The volume from the SReportData, with the given name

◆ New()

static SReportData SReportData::New ( string  name)
static

Create an empty SReportData.

Parameters
name(string) The name of the created SReportData
Returns
(SReportData) The new SReportData.

◆ toString()

string SReportData::toString ( )

Get the type of the variable.

Returns
(string) The type name

◆ UpdateMainViewSet()

SReportData::UpdateMainViewSet ( )

Update the main view of the SReportData with the current 3D view.

◆ ValuesToString()

string SReportData::ValuesToString ( )

Get a debug string representation of the SReportData.

Returns
(string) A debug string representing the SReportData