Beispiel #1
0
        public Controlers(PickForm pView, ExternalCommandData _commandData)
        {
            pModel                = new Model();
            this.pView            = pView;
            this.pView.Controllor = this;
            commandData           = _commandData;

            //对pModel中的成员进行初始化
            pModel.curve_id = null;
            pModel.floor_id = null;

            //在模型中生成用于controller的模型参数
            Document doc = _commandData.Application.ActiveUIDocument.Document;
            FilteredElementCollector collector = new FilteredElementCollector(doc);

            collector.OfCategory(BuiltInCategory.OST_StructuralFraming);
            pModel.BeamSymbolsName = new List <string>();
            pModel.BeamSymbols     = new List <FamilySymbol>();
            FamilySymbol familySymbol = null;

            foreach (var item in collector)
            {
                familySymbol = item as FamilySymbol;
                if (familySymbol != null)
                {
                    pModel.BeamSymbolsName.Add(familySymbol.Name.ToString());
                    //族本身加入到相应的文件中
                    pModel.BeamSymbols.Add(familySymbol);
                }
            }
        }
Beispiel #2
0
 public ExecuteEvent()
 {
     pForm = null;
 }
Beispiel #3
0
 public ExecuteEvent(PickForm _pform)
 {
     pForm = _pform;
 }