Modifies the default string abbreviation to be used with a specific unit.
public static string SetUnitAbbreviation(
Leadtools.Annotations.AnnUnit unit,
string newValue
)
Public Shared Function SetUnitAbbreviation( _
ByVal unit As Leadtools.Annotations.AnnUnit, _
ByVal newValue As String _
) As String
public:
static String^ SetUnitAbbreviation(
Leadtools.Annotations.AnnUnit unit,
String^ newValue
)
unit
An AnnUnit value to change its abbreviation.
newValue
A string value that specifies the abbreviation to be used with unit.
A System.String that specifes the previous default value.
You can use this method to globally change the abbreviation used with any unit during the life of your program.
This example will change the abbreviation of SmartEnglish from the default of "in" to "inch":
using Leadtools;
using Leadtools.Annotations;
private void AnnUnitConverter_SetUnitAbbreviation()
{
AnnRulerObject ruler1 = new AnnRulerObject();
ruler1.MeasurementUnit = AnnUnit.SmartEnglish;
// Should be the default of "in"
Console.WriteLine("UnitAbbreviation: {0}", ruler1.UnitAbbreviation);
// Change the default abbreviation of SmartEnglish to "inches"
AnnUnitConverter.SetUnitAbbreviation(AnnUnit.SmartEnglish, "inches");
// Create another ruler with SmartEnglish measurement units
AnnRulerObject ruler2 = new AnnRulerObject();
ruler2.MeasurementUnit = AnnUnit.SmartEnglish;
// Should be the new value of "inches"
Console.WriteLine("UnitAbbreviation: {0}", ruler2.UnitAbbreviation);
}
Imports Leadtools
Imports Leadtools.Annotations
Private Sub AnnUnitConverter_SetUnitAbbreviation()
Dim ruler1 As New AnnRulerObject()
ruler1.MeasurementUnit = AnnUnit.SmartEnglish
' Should be the default of "in"
Console.WriteLine("UnitAbbreviation: {0}", ruler1.UnitAbbreviation)
' Change the default abbreviation of SmartEnglish to "inches"
AnnUnitConverter.SetUnitAbbreviation(AnnUnit.SmartEnglish, "inches")
' Create another ruler with SmartEnglish measurement units
Dim ruler2 As New AnnRulerObject()
ruler2.MeasurementUnit = AnnUnit.SmartEnglish
' Should be the new value of "inches"
Console.WriteLine("UnitAbbreviation: {0}", ruler2.UnitAbbreviation)
End Sub
Products |
Support |
Feedback: SetUnitAbbreviation Method - Leadtools.Annotations |
Introduction |
Help Version 19.0.2017.6.20
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.