Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!

Untitled

By: chekalin-v on Jan 15th, 2013  |  syntax: C#  |  size: 0.63 KB  |  views: 251  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. }