STK UtilSend comments on this topic.
SetCurrentUnit Method (IAgUnitPrefsDimCollection)
See Also
Dimension
The dimension to set the current unit.
UnitAbbrv
The unit abbreviation to set the current dimension's unit to.
Windows





Windows & Linux

Description

Method to set unit preferences.

Syntax

[Visual Basic .NET]
Public Sub SetCurrentUnit( _
    ByVal Dimension As String, _
    ByVal UnitAbbrv As String _
)
[C#]
public void SetCurrentUnit(
    string Dimension,
    string UnitAbbrv
);
[Managed C++]
public: void SetCurrentUnit(
    String __gc ^ Dimension,
    String __gc ^ UnitAbbrv
);
[Unmanaged C++]
public: HRESULT SetCurrentUnit(
    BSTR Dimension,
    BSTR UnitAbbrv
);
[Java]
public void setCurrentUnit(
    String Dimension,
    String UnitAbbrv
);
[Python - STK API ]
def SetCurrentUnit(self, Dimension:str, UnitAbbrv:str) -> None:

Parameters

Dimension
The dimension to set the current unit.
UnitAbbrv
The unit abbreviation to set the current dimension's unit to.

See Also

Example

Set a current unit preference
[C#]
// DistanceUnit
root.UnitPreferences.SetCurrentUnit("Distance", "m");
Set a current unit preference
[Visual Basic .NET]
' DistanceUnit
root.UnitPreferences.SetCurrentUnit("Distance", "m")
© 2024 Analytical Graphics, Inc. All Rights Reserved.