Control.createValue


createValue(name, [energy], [force], [length], [mass], [time], [temperature], [perUnitLength])

Create a new value within this control for subsequent use. The initial value will be 0.0 until modified by a call to setValue. LUSAS will not use this value for any purpose, but will store it in model files, and allow subsequent modification with setValue and/or subsequent access with getValue. The value may have any simple data type - integer, boolean, real or string, but may not be an array, object or other complex type. For numbers, it will often be desireable, but is not compulsary, to attach unit information to the value, such that its value can be fetched or modified in a known system of units. This is done using the six optional integers. The integers represent the indices, or 'power' of each scalar quantity - e.g. 2=squared,3=cubed and so on. Each integer may be positive or negative. E.g. specifying '0,0,1,0,0,0' would mean that the new quantity is a length; '0,0,2,0,0,0' would mean length squared, i.e. area; '0,0,1,0,-1,0' would mean length divided by time, i.e. velocity; and '0,1,-2,0,0,0' would mean force per unit area.

namestringname of the new value
energyoptional integer energy component of the new value (default 0.0)
forceoptional integer force component of the new value (default 0.0)
lengthoptional integer length component of the new value (default 0.0)
massoptional integer mass component of the new value (default 0.0)
timeoptional integer time component of the new value (default 0.0)
temperatureoptional integer temperature component of the new value (default 0.0)
perUnitLengthoptional integer Only to be used for quantities that are 'per unit length' or 'per unit area', such as "mm˛/m" (default 0.0)
Return valueIFDispatch

Back to Control

Back to Overview