The main dimensions and a table of deck data will be written to an Excel file. In here, the total deck area will be calculated and the result will be send sent back to Quaestor in the parameter “Total_deck_area
”.
Parameter name | Dimension | Determined by | Reference | In Class |
| [$] | USL: User of System/function | Data written to Excel sheet | Excel |
| [$] | USL: User of System/function | Excel file name | Excel |
| [$m^2] | USL: User of System/function | Total deck area calculated by Excel | Excel |
Data to Excel
“: “Loa
”, “Lpp
”, “Boa
”, “Dm
”, “Data_to_excel$
”, “Deck_data#
”, “File_name_Excel$
”, “ and Total_deck_
area and “QEntityData”area
.Loa = ENTITY#(xx).Loa
...
where “xx” is the
...
QEntityID
value of
...
entity Main Dimensions
...
.
Lpp = ENTITY#(xx).Lpp
...
where “xx” is the
...
QEntityID
value of
...
entity Main Dimensions
...
.
Boa = ENTITY#(xx).Boa
...
where “xx” is the
...
QEntityID
value of
...
entity Main Dimensions
...
.
Dm = ENTITY#(xx).Dm
...
where “xx” is the
...
QEntityID
value of
...
entity Main Dimensions
...
.
Deck_data# = ENTITY#
ENTITY#(xx).Deck_data#
...
where “xx” is the
...
QEntityID
value of
...
entity Decks
...
.
File_name_Excel$ = "Deck_data_" + STR$(TIME(0)) + ".xls"
Total_deck_area = Data_to_excel$.Total_deck_area
QEntityData
.Parameter Data
Parameter “Data_to_
Excel$” Excel$
contains the EXCEL#() function. Create the relation as shown in Figure 85. The EXCEL#() function returns the result of an EXCEL spreadsheet calculation in TeLiTab format. See the wiki for a detailed description of EXCEL#() function.
...
Data_to_excel$ = EXCEL#(1,"NullString",File_name_Excel$,"NullString",TEXTITEM$(1),TEXTITEM$(2),Deck_data#, Loa, Lpp, Boa, Dm)
Expression Data:
Code Block |
---|
@NOCALC
TEXTITEM1=
|5
"Loa" "Deck data.Loa"
"Lpp" "Deck data.Lpp"
"Boa" "Deck data.Boa"
"Dm" "Deck data.Dm"
"Deck_data#"
{
6
"Name$" "Deck data.Name of deck(2)"
"Deck_function$" "Deck data.Function(3)"
"Z" "Deck data.Height [m](4)"
"X_aft" "Deck data.Aft position [m](5)"
"X_front" "Deck data.Front position [m](6)"
"Area" "Deck data.Area [m^2](7)"
}
|
TEXTITEM2=
|1
"Total_deck_area" "Deck data.Totaldeckarea" |
...
Back to content | Back to Tutorials<< Previous