chekalin-v

Dispay Unit Type Abbreviation

Nov 16th, 2013
190
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     [Transaction(TransactionMode.ReadOnly)]
  2.     public class Command : IExternalCommand
  3.     {
  4.         public Result Execute(
  5.           ExternalCommandData commandData,
  6.           ref string message,
  7.           ElementSet elements)
  8.         {
  9.             DisplayUnitType n
  10.       = DisplayUnitType.DUT_GALLONS_US;
  11.            
  12.             string valid_unit_symbols;
  13.  
  14.             for (DisplayUnitType i = DisplayUnitType
  15.               .DUT_METERS; i < n; ++i)
  16.             {
  17.                 var validUnitSymbols = FormatOptions.GetValidUnitSymbols(i);
  18.  
  19.                 foreach (var validUnitSymbol in validUnitSymbols)
  20.                 {
  21.                     if (validUnitSymbol != UnitSymbolType.UST_NONE)
  22.                     {
  23.                         var abbrUnitTypeLabel = LabelUtils.GetLabelFor(validUnitSymbol);
  24.                         Debug.Print("{0} - {1}", abbrUnitTypeLabel, LabelUtils.GetLabelFor(i));
  25.                     }                    
  26.                 }
  27.                
  28.             }
  29.             return Result.Succeeded;
  30.         }
  31.     }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×