An implementation for a non file-based point cloud. In this implementaiton, the location of the cells, including their colors and options, are hardcoded.
Наследование: PointCloudAccessBase, IPointCloudAccess
Пример #1
0
        /// <summary>
        /// The implementation for IExternalCommand.Execute()
        /// </summary>
        /// <param name="commandData">The Revit command data.</param>
        /// <param name="message">The error message (ignored).</param>
        /// <param name="elements">The elements to display in the failure dialog (ignored).</param>
        /// <returns>Result.Succeeded</returns>
        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
        {
            PredefinedPointCloud cloud = new PredefinedPointCloud("dummy");

            XDocument doc  = new XDocument();
            XElement  root = new XElement("PointCloud");

            cloud.SerializeObjectData(root);
            doc.Add(root);

            TextWriter writer = new StreamWriter(@"c:\serializedPC.xml");

            doc.WriteTo(new XmlTextWriter(writer));

            writer.Close();

            return(Result.Succeeded);
        }
Пример #2
0
        /// <summary>
        /// The implementation for IExternalCommand.Execute()
        /// </summary>
        /// <param name="commandData">The Revit command data.</param>
        /// <param name="message">The error message (ignored).</param>
        /// <param name="elements">The elements to display in the failure dialog (ignored).</param>
        /// <returns>Result.Succeeded</returns>
        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
        {
            PredefinedPointCloud cloud = new PredefinedPointCloud("dummy");

             XDocument doc = new XDocument();
             XElement root = new XElement("PointCloud");
             cloud.SerializeObjectData(root);
             doc.Add(root);

             TextWriter writer = new StreamWriter(@"c:\serializedPC.xml");
             doc.WriteTo(new XmlTextWriter(writer));

             writer.Close();

             return Result.Succeeded;
        }