Esempio n. 1
0
        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
        {
            OutLocation = OutputLocation.DEBUG;

            SmAppInit();
            SmUsrInit();
            RsMgr.Read();

            RevitSettingsUnitApp a = RsuApp;
            SchemaDictionaryApp  b = RsuAppSetg;

            RevitSettingsUnitUsr       c = RsuUsr;
            List <SchemaDictionaryUsr> d = RsuUsrSetg;

            SettingsMgr <SettingsAppBase> e = SmApp;
            SettingsAppBase g = SmAppSetg;

            SettingsMgr <SettingsUsrBase> h = SmUsr;
            SettingsUsrBase            j    = SmUsrSetg;
            List <SchemaDictionaryUsr> k    = SmuUsrSetg;

            test111();
            logMsg("");
            test112();

            return(Result.Succeeded);
        }
        // test revit setting functions
        private void test112()
        {
            RevitSettingsUnitApp a = RsuApp;
            SchemaDictionaryApp  b = RsuAppSetg;

            RevitSettingsUnitUsr       c = RsuUsr;
            List <SchemaDictionaryUsr> d = RsuUsrSetg;

            bool init = RvtSetgInitalized;

            logMsg("\n");
            logMsgDbLn2("revit Settings", "before");
            logMsg("\n");

            logMsgDbLn2("revit setting initalized", RvtSetgInitalized.ToString());

            // reset must be first in order to initialize system - yes?
            logMsg("\n");
            logMsgDbLn2("revit Settings", "init");
            RsMgr.Init();
            ListRevitSettings();

            init = RvtSetgInitalized;

            logMsg("\n");
            logMsgDbLn2("revit Settings", "read");
            RsMgr.Read();
            ListRevitSettings();

            logMsg("\n");
            logMsgDbLn2("revit Settings", "revise values & save");

            RsuUsrSetg[0][VERSION_UNIT].Value = "10.0";
            RsuUsrSetg[0][USER_NAME].Value    = "jeffs";

            logMsg("\n");
            logMsgDbLn2("revit Settings", "save");
            RsMgr.Save();
            ListRevitSettings();

            return;

            logMsg("\n");
            logMsgDbLn2("revit Settings", "revise values & don't save");

            RsuUsrSetg[0][VERSION_UNIT].Value = "1.1";
            RsuUsrSetg[0][USER_NAME].Value    = "none";

            logMsg("\n");
            logMsgDbLn2("revit Settings", "read");
            RsMgr.Read();
            ListRevitSettings();
        }
Esempio n. 3
0
        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
        {
            AppRibbon.UiApp = commandData.Application;
            AppRibbon.Uidoc = AppRibbon.UiApp.ActiveUIDocument;
            AppRibbon.App   = AppRibbon.UiApp.Application;
            AppRibbon.Doc   = AppRibbon.Uidoc.Document;

            OutLocation = OutputLocation.DEBUG;

            RevitSettingsUnitApp a = RsuApp;
            SchemaDictionaryApp  b = RsuAppSetg;

            RevitSettingsUnitUsr       c = RsuUsr;
            List <SchemaDictionaryUsr> d = RsuUsrSetg;

            RsMgr.Init();

            return(Test01());
        }