/// <summary>
 /// Initializes a new instance of the CommonParametersBase object with list of parameters.
 /// </summary>
 /// <param name="listElementStatus">List identyficators of elements with result status.</param>
 /// <param name="listCombinationId">List load combinations identificators</param>
 /// <param name="activePackageGuid">Identificator of active package with results.</param>
 /// <param name="calculationParameters">Calculation parameters.</param>
 public CommonParametersBase(List <Tuple <ElementId, ResultStatus> > listElementStatus,
                             List <ElementId> listCombinationId,
                             Guid activePackageGuid,
                             Autodesk.Revit.DB.ExtensibleStorage.Framework.SchemaClass calculationParameters)
 {
     listElemStatus         = listElementStatus;
     listCombId             = listCombinationId;
     this.activePackageGuid = activePackageGuid;
     calcParams             = calculationParameters;
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the ObjectDataBase object with list of parameters.
 /// </summary>
 /// <param name="elementId">Element identificator.</param>
 /// <param name="elementCategory">Element category.</param>
 /// <param name="elementMaterial">Element material.</param>
 /// <param name="elementLabel">Element label.</param>
 public ObjectDataBase(ElementId elementId,
                       Autodesk.Revit.DB.BuiltInCategory elementCategory,
                       StructuralAssetClass elementMaterial,
                       Autodesk.Revit.DB.ExtensibleStorage.Framework.SchemaClass elementLabel)
 {
     category = elementCategory;
     material = elementMaterial;
     elemId   = new ElementId(elementId.IntegerValue);;
     label    = elementLabel;
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the ElementDataBase object with list of parameters.
 /// </summary>
 /// <param name="elementResult">Element results schema.</param>
 /// <param name="listcalcPoint">List of the element's calculation points.</param>
 /// <param name="listSectionData">List of sections' data.</param>
 /// <param name="elementStatus">Element result status.</param>
 /// <param name="document">Acces to cref="Document".</param>
 /// <param name="data">Object with base parameters for the element.</param>
 public ElementDataBase(Autodesk.Revit.DB.ExtensibleStorage.Framework.SchemaClass elementResult,
                        List <CalcPoint> listcalcPoint,
                        List <SectionDataBase> listSectionData,
                        Autodesk.Revit.DB.CodeChecking.Storage.ResultStatus elementStatus,
                        Document document,
                        ObjectDataBase data)
     : base(data)
 {
     Result        = elementResult;
     calcPoints    = listcalcPoint;
     listSectData  = listSectionData;
     Status        = elementStatus;
     this.document = document;
 }
Esempio n. 4
0
        /// <summary>
        /// Verify parameters of user element label.
        /// </summary>
        /// <param name="category">Category of the element.</param>
        /// <param name="material">Material of the element.</param>
        /// <param name="label">Element label."</param>
        /// <param name="status">Reference to element's status".</param>
        public void VerifyElementLabel(Autodesk.Revit.DB.BuiltInCategory category, StructuralAssetClass material, Autodesk.Revit.DB.ExtensibleStorage.Framework.SchemaClass label,
                                       ref Autodesk.Revit.DB.CodeChecking.Storage.ResultStatus status)
        {
            if (label != null)
            {
                switch (material)
                {
                case StructuralAssetClass.Concrete:
                    switch (category)
                    {
                    default:
                        break;

                    case Autodesk.Revit.DB.BuiltInCategory.OST_ColumnAnalytical:
                    {
                        LabelColumn labelCol = label as LabelColumn;
                        if (labelCol != null)
                        {
                            if (labelCol.EnabledInternalForces.Count == 0)
                            {
                                status.AddError(Resources.ResourceManager.GetString("ErrNoChosenInternalForces"));
                            }
                            List <string> errors = VerifySteel(labelCol.LongitudinalReinforcement, true);
                            foreach (string s in errors)
                            {
                                status.AddError(s);
                            }
                            errors = VerifySteel(labelCol.TransversalReinforcement, false);
                            foreach (string s in errors)
                            {
                                status.AddError(s);
                            }
                        }
                    }
                    break;

                    case Autodesk.Revit.DB.BuiltInCategory.OST_BeamAnalytical:
                    {
                        LabelBeam labelBm = label as LabelBeam;
                        if (labelBm != null)
                        {
                            if (labelBm.EnabledInternalForces.Count == 0)
                            {
                                status.AddError(Resources.ResourceManager.GetString("ErrNoChosenInternalForces"));
                            }
                            List <string> errors = VerifySteel(labelBm.LongitudinalReinforcement, true);
                            foreach (string s in errors)
                            {
                                status.AddError(s);
                            }
                            errors = VerifySteel(labelBm.TransversalReinforcement, false);
                            foreach (string s in errors)
                            {
                                status.AddError(s);
                            }
                        }
                    }
                    break;
                    }
                    break;

                case StructuralAssetClass.Metal:
                    break;
                }
            }
        }