SHARE
TWEET

Untitled

chekalin-v Jan 15th, 2013 317 Never
  1. using Autodesk.Revit.Attributes;
  2. using Autodesk.Revit.DB;
  3. using Autodesk.Revit.UI;
  4. using UIFrameworkServices;
  5.  
  6. namespace TestAddIn2013
  7. {
  8.     [Transaction(TransactionMode.Manual)]
  9.     public class IsDemoModeCommand : IExternalCommand
  10.     {
  11.         public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
  12.         {
  13.             bool isDemoMode =
  14.                 InfoCenterService.ProductSerialNumber.Equals("000-00000000");
  15.  
  16.             TaskDialog.Show("Is demo mode", string.Format("Is demo mode: {0}", isDemoMode));
  17.  
  18.             return Result.Succeeded;
  19.            
  20.         }
  21.     }
  22. }
RAW Paste Data
Top