STK UtilSend comments on this topic.
GetCurrentUnitAbbrv Method (IAgUnitPrefsDimCollection)
See Also
IndexOrDimName
The index or dimension name.
Windows





Windows & Linux

Description

Returns the Current Unit for a Dimension.

Syntax

[Visual Basic .NET]
Public Function GetCurrentUnitAbbrv( _
    ByVal IndexOrDimName As System.Object _
) As String
[C#]
public string GetCurrentUnitAbbrv(
    System.Object IndexOrDimName
);
[Managed C++]
public: String __gc ^ GetCurrentUnitAbbrv(
    VARIANT IndexOrDimName
);
[Unmanaged C++]
public: HRESULT GetCurrentUnitAbbrv(
    VARIANT IndexOrDimName,
    BSTR * pUnitAbbrv
);
[Java]
public String getCurrentUnitAbbrv(
    AgVariant IndexOrDimName
);
[Python - STK API ]
def GetCurrentUnitAbbrv(self, IndexOrDimName:typing.Any) -> str:

Parameters

IndexOrDimName
The index or dimension name.

Return Type

Returns the current unit abbreviation for the given index.

See Also

Example

Get a current unit preference
[C#]
// DistanceUnit
string dimensionName = "Distance";
string unitAbbreviation = root.UnitPreferences.GetCurrentUnitAbbrv(dimensionName);
Get a current unit preference
[Visual Basic .NET]
' DistanceUnit
Dim dimensionName As String = "Distance"
Dim unitAbbreviation As String = root.UnitPreferences.GetCurrentUnitAbbrv(dimensionName)
© 2024 Analytical Graphics, Inc. All Rights Reserved.