public void StreamOut(RStrmOut writer)
        {
            foreach (var property in ModelSchema.BridgeAssignmentTakeoffObjectKeywordArray.RKwdCollection)
            {
                string propertyName = property.Name;
                switch (property.Id)
                {
                case (int)BridgeAssignTakeoffProperty.SId:
                    writer.WriteString(propertyName, TkoSystemId);
                    break;

                case (int)BridgeAssignTakeoffProperty.Proj:
                    writer.WriteString(propertyName, TkoProjectId);
                    break;

                case (int)BridgeAssignTakeoffProperty.Id:
                    writer.WriteString(propertyName, TkoId);
                    break;

                case (int)BridgeAssignTakeoffProperty.Typ:
                    writer.WriteString(propertyName, TkoTypeId);
                    break;

                case (int)BridgeAssignTakeoffProperty.RfId:
                    writer.WriteInteger(propertyName, TkoRefId);
                    break;

                case (int)BridgeAssignTakeoffProperty.Desc:
                    writer.WriteString(propertyName, Description);
                    break;
                }
            }
        }
        public void StreamOut(RStrmOut writer)
        {
            foreach (var property in ModelSchema.BridgeAssignmentEstItemKeywordArray.RKwdCollection)
            {
                string propertyName = property.Name;
                switch (property.Id)
                {
                case (int)BridgeAssignEstItemProperty.Id:
                    writer.WriteString(propertyName, EstItemId);
                    break;

                case (int)BridgeAssignEstItemProperty.Qty:
                    writer.WriteDouble(propertyName, QuantityGenerated, 4);
                    break;

                case (int)BridgeAssignEstItemProperty.Asn:
                    foreach (var item in VariableAssignmentList)
                    {
                        writer.ObjectBegin(propertyName);
                        item.StreamOut(writer);
                        writer.ObjectEnd();
                    }
                    break;
                }
            }
        }
        public void StreamOut(RStrmOut writer)
        {
            if (string.Equals(VariableValue, _fromOverrideValue))
            {
                _fromOverrideValue = string.Empty;
            }

            foreach (var property in ModelSchema.VariableAssignmentKeywordArray.RKwdCollection)
            {
                string propertyName = property.Name;
                switch (property.Id)
                {
                case (int)BridgeAssignVariableAssignProperty.Tko:
                    writer.WriteInteger(propertyName, FromTakeoffNumber);
                    break;

                case (int)BridgeAssignVariableAssignProperty.FVar:
                    writer.WriteString(propertyName, FromVariableName);
                    break;

                case (int)BridgeAssignVariableAssignProperty.TVar:
                    writer.WriteString(propertyName, ToVariableName);
                    break;

                case (int)BridgeAssignVariableAssignProperty.Val:
                    writer.WriteString(propertyName, VariableValue);
                    break;

                case (int)BridgeAssignVariableAssignProperty.FOVal:
                    writer.WriteString(propertyName, _fromOverrideValue);
                    break;

                case (int)BridgeAssignVariableAssignProperty.MTko:
                    writer.WriteBoolean(propertyName, MissingTkoVariable);
                    break;
                }
            }
        }
        public void StreamOut(RStrmOut writer)
        {
            foreach (var property in ModelSchema.BridgeAssignmentResourceKeywordArray.RKwdCollection)
            {
                string propertyName = property.Name;
                switch (property.Id)
                {
                case (int)BridgeAssignResourceProperty.Id:
                {
                    writer.WriteString(propertyName, ResourceId);
                    break;
                }

                case (int)BridgeAssignResourceProperty.Typ:
                {
                    var value = 'I';
                    if (ResourceType == ResourceType.Item)
                    {
                        value = 'I';
                    }
                    if (ResourceType == ResourceType.Assembly)
                    {
                        value = 'A';
                    }
                    value = 'S';
                    writer.WriteString(propertyName, value.ToString(CultureInfo.InvariantCulture));
                    break;
                }

                case (int)BridgeAssignResourceProperty.Desc:
                {
                    writer.WriteString(propertyName, Description);
                    break;
                }
                }
            }
        }
        public void StreamOut(RStrmOut writer)
        {
            foreach (var obj in AssignmentPassCollection)
            {
                if (obj.PrimaryTakeoffObjectCollection == null || obj.PrimaryTakeoffObjectCollection.Count() == 0)
                {
                    obj.PrimaryTakeoffNumber = -1;
                }
                else
                {
                    if (TakeoffObjectCollection != null)
                    {
                        var primaryTko =
                            obj.PrimaryTakeoffObjectCollection.FirstOrDefault();
                        obj.PrimaryTakeoffNumber = primaryTko.TkoRefId;
                    }
                }
            }

            writer.ObjectBegin("");
            foreach (var property in ModelSchema.BridgeAssignmentKeywordArray.RKwdCollection)
            {
                string propertyName = property.Name;
                switch (property.Id)
                {
                case (int)BridgeAssignmentProperty.Tko:
                    if (TakeoffObjectCollection != null)
                    {
                        foreach (var item in TakeoffObjectCollection)
                        {
                            writer.ObjectBegin(propertyName);
                            item.StreamOut(writer);
                            writer.ObjectEnd();
                        }
                    }
                    break;

                case (int)BridgeAssignmentProperty.Res:
                    foreach (var item in ResourceCollection)
                    {
                        writer.ObjectBegin(propertyName);
                        item.StreamOut(writer);
                        writer.ObjectEnd();
                    }
                    break;

                case (int)BridgeAssignmentProperty.Pass:
                    foreach (var item in AssignmentPassCollection)
                    {
                        writer.ObjectBegin(propertyName);
                        item.StreamOut(writer);
                        writer.ObjectEnd();
                    }
                    break;

                case (int)BridgeAssignmentProperty.Item:
                    foreach (var item in ItemDetailCollection)
                    {
                        writer.ObjectBegin(propertyName);
                        item.StreamOut(writer);
                        writer.ObjectEnd();
                    }
                    break;

                case (int)BridgeAssignmentProperty.AsnId:
                    writer.WriteString(propertyName, AssignmentId);
                    break;
                }
            }
            writer.ObjectEnd();
        }