Example #1
0
        public Result Execute(ExternalCommandData commandData,
                              ref string message,
                              ElementSet elements)
        {
            //UIApplication _uiapp = commandData.Application;
            //UIDocument _uidoc = _uiapp.ActiveUIDocument;
            //Autodesk.Revit.ApplicationServices.Application _app = _uiapp.Application;
            //Autodesk.Revit.DB.Document _doc = _uidoc.Document;
            //string _wsName = "ELEC LIGHTING";

            //WorksetTable wst = _doc.GetWorksetTable();
            //WorksetId wsID = FamilyUtils.WhatIsThisWorkSetIDByName(_wsName, _doc);
            //if (wsID != null) {
            //    using (Transaction trans = new Transaction(_doc, "WillChangeWorkset")) {
            //        trans.Start();
            //        wst.SetActiveWorksetId(wsID);
            //        trans.Commit();
            //    }
            //}

            string  _wsName = "ELEC LIGHTING";
            HelperA beThis  = new HelperA();

            beThis.BeWorkset(_wsName, commandData);
            return(Result.Succeeded);
        }
Example #2
0
        public Result Execute(ExternalCommandData commandData,
                              ref string message,
                              ElementSet elements)
        {
            string  _wsName = "ELEC POWER";
            HelperA beThis  = new HelperA();

            beThis.BeWorkset(_wsName, commandData);
            return(Result.Succeeded);
        }