OpenSTAAD V8i

View.SetUnits

Set viewing unit for the active view.

VB Syntax

View.SetUnits UnitType, UnitForIt

Where:

UnitType

An integer variable that holds unit type. Values are as follows:

0 = Dimension

1 = Displacement (Translational Degrees of Freedom)

2 = Sectional Dimension

3 = Sectional Area

4 = Moment of Inertia

5 = Force

6 = Moment

7 = Distributed Force

8 = Distributed Moment

9 = Material Density

10 = Acceleration

11 = Spring Constants (Translational Degrees of Freedom)

12 = Spring Constants (Rotational Degrees of Freedom)

13 = Material Modulus

14 = Stress

15 = Alpha (Coefficient of Thermal Expansion)

16 = Temperature

17 = Mass

18 = Sectional Modulus

19 = Displacement (Rotational Degrees of Freedom)

20 = Soil Subgrade Modulus

-1 = No Unit

UnitForIt

A string variable that holds the unit for the specified type. Like “cm”, “kns”, “feet”, “kn/cm” etc.

VB Example

Dim intUnitType as Integer
Dim strUnitForIt as String
'Get the application object --
'Set View Unit
objOpenSTAAD.View.SetUnits (intUnitType, strUnitForIt)