shipCreateLoadCondition.Tools Namespace Reference


def createLoadCondition (ship)



Function Documentation

def shipCreateLoadCondition.Tools.createLoadCondition (   ship)
Create a new loading condition spreadsheet

Position arguments:
ship -- Ship object

Returned value:
lc -- The new loading condition spreadsheet object

The new spreadsheet will initialize all the tanks as empty. To modify the
fluid density and the filling level percentages the columns D and E should
be edited (the first tank can be found at the row 6)

For instance, the following code snippet can be used to set the first tank
50% filled with water:
lc.set("D6", "998.0")
lc.set("E6", "0.5")

The label of the tank can be extracted from the column C, for instance:
Such information can be used to get the tank object (the followinbg code
may fail if either the tank has been removed, or several objects with the
same label already exist):
tank = App.ActiveDocument.getObjectsByLabel(lc.get("C6"))[0]

The tool will claim the new spreadsheet loading condition as a child of the
ship object. Please do not remove the partner ship object before removing
this new loading condition before.

Variable Documentation