The FootPrintRoofLine class is used to edit the foot print data of a footprint roof.
Example #1
0
 /// <summary>
 ///  Override the ConvertTo method, convert a FootPrintRoofLine type value to a string type value for displaying in the PropertyGrid.
 /// </summary>
 /// <param name="context"></param>
 /// <param name="culture"></param>
 /// <param name="value"></param>
 /// <param name="destinationType"></param>
 /// <returns></returns>
 public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
 {
     if (destinationType == typeof(System.String) && value is FootPrintRoofLine)
     {
         FootPrintRoofLine footPrintLine = (FootPrintRoofLine)value;
         return(footPrintLine.Name + "[" + footPrintLine.Id.ToString() + "]");
     }
     return(base.ConvertTo(context, culture, value, destinationType));
 }
        /// <summary>
        /// The construct of the FootPrintRoofWrapper class.
        /// </summary>
        /// <param name="roof">The footprint roof which will be edited in a PropertyGrid.</param>
        public FootPrintRoofWrapper(FootPrintRoof roof)
        {
            m_roof      = roof;
            m_roofLines = new List <FootPrintRoofLine>();
            ModelCurveArrArray curveloops = m_roof.GetProfiles();

            foreach (ModelCurveArray curveloop in curveloops)
            {
                foreach (ModelCurve curve in curveloop)
                {
                    m_roofLines.Add(new FootPrintRoofLine(m_roof, curve));
                }
            }

            FootPrintRoofLineConverter.SetStandardValues(m_roofLines);
            m_footPrintLine = m_roofLines[0];

            m_boundingbox = m_roof.get_BoundingBox(Revit.SDK.Samples.NewRoof.CS.Command.ActiveView);
        }
Example #3
0
        /// <summary>
        /// The construct of the FootPrintRoofWrapper class.
        /// </summary>
        /// <param name="roof">The footprint roof which will be edited in a PropertyGrid.</param>
        public FootPrintRoofWrapper(FootPrintRoof roof)
        {
            m_roof = roof;
            m_roofLines = new List<FootPrintRoofLine>();
            ModelCurveArrArray curveloops = m_roof.GetProfiles();

            foreach(ModelCurveArray curveloop in curveloops)
            {
                foreach(ModelCurve curve in curveloop)
                {
                    m_roofLines.Add(new FootPrintRoofLine(m_roof, curve));
                }
            }

            FootPrintRoofLineConverter.SetStandardValues(m_roofLines);
            m_footPrintLine = m_roofLines[0];

            m_boundingbox = m_roof.get_BoundingBox(Revit.SDK.Samples.NewRoof.CS.Command.ActiveView);
        }