mirror of
https://github.com/jeremytammik/RevitSdkSamples.git
synced 2026-09-19 02:38:54 +00:00
added Revit 2020 SDK files
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM 'AS IS' AND WITH ALL ITS FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
namespace Revit.SDK.Samples.FoundationSlab.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements the Revit add-in interface IExternalCommand
|
||||
/// </summary>
|
||||
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
|
||||
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
|
||||
[Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)]
|
||||
public class Command : IExternalCommand
|
||||
{
|
||||
#region IExternalCommand Members Implementation
|
||||
/// <summary>
|
||||
/// Implement this method as an external command for Revit.
|
||||
/// </summary>
|
||||
/// <param name="commandData">An object that is passed to the external application
|
||||
/// which contains data related to the command,
|
||||
/// such as the application object and active view.</param>
|
||||
/// <param name="message">A message that can be set by the external application
|
||||
/// which will be displayed if a failure or cancellation is returned by
|
||||
/// the external command.</param>
|
||||
/// <param name="elements">A set of elements to which the external application
|
||||
/// can add elements that are to be highlighted in case of failure or cancellation.</param>
|
||||
/// <returns>Return the status of the external command.
|
||||
/// A result of Succeeded means that the API external method functioned as expected.
|
||||
/// Cancelled can be used to signify that the user cancelled the external operation
|
||||
/// at some point. Failure should be returned if the application is unable to proceed with
|
||||
/// the operation.</returns>
|
||||
public Autodesk.Revit.UI.Result Execute(ExternalCommandData commandData, ref string message, Autodesk.Revit.DB.ElementSet elements)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Check commandData parameter.
|
||||
if (null == commandData)
|
||||
{
|
||||
return Autodesk.Revit.UI.Result.Failed;
|
||||
}
|
||||
|
||||
SlabData revitDatas = null;
|
||||
try
|
||||
{
|
||||
// The Datas for UI.
|
||||
revitDatas = new SlabData(commandData.Application);
|
||||
}
|
||||
catch (NullReferenceException e)
|
||||
{
|
||||
message = e.Message;
|
||||
return Autodesk.Revit.UI.Result.Cancelled; // Data error.
|
||||
}
|
||||
// Display form.
|
||||
using (FoundationSlabForm displayForm = new FoundationSlabForm(revitDatas))
|
||||
{
|
||||
if (displayForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
{
|
||||
return Autodesk.Revit.UI.Result.Succeeded; // Create foundation slabs successfully.
|
||||
}
|
||||
}
|
||||
return Autodesk.Revit.UI.Result.Cancelled; // Cancel creation.
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
message = e.Message;
|
||||
return Autodesk.Revit.UI.Result.Failed; // Unknow error.
|
||||
}
|
||||
}
|
||||
#endregion IExternalCommand Members Implementation
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RevitAddIns>
|
||||
<AddIn Type="Command">
|
||||
<Assembly>FoundationSlab.dll</Assembly>
|
||||
<ClientId>1efe6d77-3894-41f3-b56c-882a8bea5b40</ClientId>
|
||||
<FullClassName>Revit.SDK.Samples.FoundationSlab.CS.Command</FullClassName>
|
||||
<Text>Foundation Slab</Text>
|
||||
<Description>Convert regular floors at the base of the building to octagonal slabs.</Description>
|
||||
<VisibilityMode>AlwaysVisible</VisibilityMode>
|
||||
<VendorId>ADSK</VendorId>
|
||||
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
|
||||
</AddIn>
|
||||
</RevitAddIns>
|
||||
@@ -0,0 +1,103 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.30729</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{53D3114D-D1C7-4C70-825B-CA28AE8FFE1D}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Revit.SDK.Samples.FoundationSlab.CS</RootNamespace>
|
||||
<AssemblyName>FoundationSlab</AssemblyName>
|
||||
<SignAssembly>false</SignAssembly>
|
||||
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRules>-Microsoft.Globalization#CA1301;-Microsoft.Globalization#CA1302;-Microsoft.Globalization#CA1303;-Microsoft.Globalization#CA1306;-Microsoft.Globalization#CA1304;-Microsoft.Globalization#CA1305;-Microsoft.Globalization#CA1300;-Microsoft.Interoperability#CA1403;-Microsoft.Interoperability#CA1406;-Microsoft.Interoperability#CA1413;-Microsoft.Interoperability#CA1402;-Microsoft.Interoperability#CA1407;-Microsoft.Interoperability#CA1404;-Microsoft.Interoperability#CA1410;-Microsoft.Interoperability#CA1411;-Microsoft.Interoperability#CA1405;-Microsoft.Interoperability#CA1409;-Microsoft.Interoperability#CA1415;-Microsoft.Interoperability#CA1408;-Microsoft.Interoperability#CA1414;-Microsoft.Interoperability#CA1412;-Microsoft.Interoperability#CA1400;-Microsoft.Interoperability#CA1401;-Microsoft.Mobility#CA1600;-Microsoft.Mobility#CA1601;-Microsoft.Portability#CA1901;-Microsoft.Portability#CA1900;-Microsoft.Reliability#CA2000;-Microsoft.Reliability#CA2002;-Microsoft.Reliability#CA2003;-Microsoft.Reliability#CA2004;-Microsoft.Reliability#CA2006</CodeAnalysisRules>
|
||||
<RunCodeAnalysis>false</RunCodeAnalysis>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<CodeAnalysisRules>-Microsoft.Globalization#CA1301;-Microsoft.Globalization#CA1302;-Microsoft.Globalization#CA1303;-Microsoft.Globalization#CA1306;-Microsoft.Globalization#CA1304;-Microsoft.Globalization#CA1305;-Microsoft.Globalization#CA1300;-Microsoft.Interoperability#CA1403;-Microsoft.Interoperability#CA1406;-Microsoft.Interoperability#CA1413;-Microsoft.Interoperability#CA1402;-Microsoft.Interoperability#CA1407;-Microsoft.Interoperability#CA1404;-Microsoft.Interoperability#CA1410;-Microsoft.Interoperability#CA1411;-Microsoft.Interoperability#CA1405;-Microsoft.Interoperability#CA1409;-Microsoft.Interoperability#CA1415;-Microsoft.Interoperability#CA1408;-Microsoft.Interoperability#CA1414;-Microsoft.Interoperability#CA1412;-Microsoft.Interoperability#CA1400;-Microsoft.Interoperability#CA1401;-Microsoft.Mobility#CA1600;-Microsoft.Mobility#CA1601;-Microsoft.Portability#CA1901;-Microsoft.Portability#CA1900;-Microsoft.Reliability#CA2000;-Microsoft.Reliability#CA2002;-Microsoft.Reliability#CA2003;-Microsoft.Reliability#CA2004;-Microsoft.Reliability#CA2006</CodeAnalysisRules>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Command.cs" />
|
||||
<Compile Include="SlabData.cs" />
|
||||
<Compile Include="FoundationSlabForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FoundationSlabForm.Designer.cs">
|
||||
<DependentUpon>FoundationSlabForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="RegularSlab.cs" />
|
||||
<Compile Include="Sketch.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="FoundationSlabForm.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>FoundationSlabForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(SolutionDir)VSProps\SDKSamples.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>set FILEFORSAMPLEREG="$(SolutionDir)..\..\..\..\Regression\API\SDKSamples\UpdateSampleDllForRegression.pl"
|
||||
if exist %25FILEFORSAMPLEREG%25 perl %25FILEFORSAMPLEREG%25 $(ProjectExt) "$(ProjectPath)" "$(TargetPath)" "$(SolutionDir)"</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,236 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM 'AS IS' AND WITH ALL ITS FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
namespace Revit.SDK.Samples.FoundationSlab.CS
|
||||
{
|
||||
partial class FoundationSlabForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.pictureBox = new System.Windows.Forms.PictureBox();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.diagramGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.gridGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.clearAllButton = new System.Windows.Forms.Button();
|
||||
this.selectAllButton = new System.Windows.Forms.Button();
|
||||
this.dataGridView = new System.Windows.Forms.DataGridView();
|
||||
this.typeComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.typeLabel = new System.Windows.Forms.Label();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
|
||||
this.diagramGroupBox.SuspendLayout();
|
||||
this.gridGroupBox.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// pictureBox
|
||||
//
|
||||
this.pictureBox.BackColor = System.Drawing.SystemColors.ControlText;
|
||||
this.pictureBox.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.pictureBox.Location = new System.Drawing.Point(6, 19);
|
||||
this.pictureBox.Name = "pictureBox";
|
||||
this.pictureBox.Size = new System.Drawing.Size(419, 296);
|
||||
this.pictureBox.TabIndex = 0;
|
||||
this.pictureBox.TabStop = false;
|
||||
this.pictureBox.Paint += new System.Windows.Forms.PaintEventHandler(this.pictureBox_Paint);
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.okButton.Location = new System.Drawing.Point(271, 524);
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.okButton.TabIndex = 6;
|
||||
this.okButton.Text = "&OK";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// diagramGroupBox
|
||||
//
|
||||
this.diagramGroupBox.Controls.Add(this.pictureBox);
|
||||
this.diagramGroupBox.ForeColor = System.Drawing.Color.Black;
|
||||
this.diagramGroupBox.Location = new System.Drawing.Point(12, 12);
|
||||
this.diagramGroupBox.Name = "diagramGroupBox";
|
||||
this.diagramGroupBox.Size = new System.Drawing.Size(431, 321);
|
||||
this.diagramGroupBox.TabIndex = 2;
|
||||
this.diagramGroupBox.TabStop = false;
|
||||
this.diagramGroupBox.Text = "Slabs Diagram (Analytical Model)";
|
||||
//
|
||||
// gridGroupBox
|
||||
//
|
||||
this.gridGroupBox.Controls.Add(this.clearAllButton);
|
||||
this.gridGroupBox.Controls.Add(this.selectAllButton);
|
||||
this.gridGroupBox.Controls.Add(this.dataGridView);
|
||||
this.gridGroupBox.ForeColor = System.Drawing.Color.Black;
|
||||
this.gridGroupBox.Location = new System.Drawing.Point(12, 339);
|
||||
this.gridGroupBox.Name = "gridGroupBox";
|
||||
this.gridGroupBox.Size = new System.Drawing.Size(431, 160);
|
||||
this.gridGroupBox.TabIndex = 3;
|
||||
this.gridGroupBox.TabStop = false;
|
||||
this.gridGroupBox.Text = "Regular Slabs";
|
||||
//
|
||||
// clearAllButton
|
||||
//
|
||||
this.clearAllButton.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
this.clearAllButton.Location = new System.Drawing.Point(350, 62);
|
||||
this.clearAllButton.Name = "clearAllButton";
|
||||
this.clearAllButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.clearAllButton.TabIndex = 2;
|
||||
this.clearAllButton.Text = "&Clear All";
|
||||
this.clearAllButton.UseVisualStyleBackColor = true;
|
||||
this.clearAllButton.Click += new System.EventHandler(this.clearAllButton_Click);
|
||||
//
|
||||
// selectAllButton
|
||||
//
|
||||
this.selectAllButton.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
this.selectAllButton.Location = new System.Drawing.Point(349, 19);
|
||||
this.selectAllButton.Name = "selectAllButton";
|
||||
this.selectAllButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.selectAllButton.TabIndex = 1;
|
||||
this.selectAllButton.Text = "&Select All";
|
||||
this.selectAllButton.UseVisualStyleBackColor = true;
|
||||
this.selectAllButton.Click += new System.EventHandler(this.selectAllButton_Click);
|
||||
//
|
||||
// dataGridView
|
||||
//
|
||||
this.dataGridView.AllowUserToResizeRows = false;
|
||||
this.dataGridView.BackgroundColor = System.Drawing.SystemColors.Window;
|
||||
this.dataGridView.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
|
||||
dataGridViewCellStyle2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Black;
|
||||
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dataGridView.DefaultCellStyle = dataGridViewCellStyle2;
|
||||
this.dataGridView.Location = new System.Drawing.Point(6, 19);
|
||||
this.dataGridView.Name = "dataGridView";
|
||||
this.dataGridView.RowHeadersWidth = 30;
|
||||
this.dataGridView.Size = new System.Drawing.Size(337, 133);
|
||||
this.dataGridView.TabIndex = 0;
|
||||
this.dataGridView.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CellClick);
|
||||
this.dataGridView.CurrentCellDirtyStateChanged += new System.EventHandler(this.dataGridView_CurrentCellDirtyStateChanged);
|
||||
this.dataGridView.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CellValueChanged);
|
||||
//
|
||||
// typeComboBox
|
||||
//
|
||||
this.typeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.typeComboBox.FormattingEnabled = true;
|
||||
this.typeComboBox.Location = new System.Drawing.Point(18, 525);
|
||||
this.typeComboBox.Name = "typeComboBox";
|
||||
this.typeComboBox.Size = new System.Drawing.Size(181, 21);
|
||||
this.typeComboBox.TabIndex = 4;
|
||||
this.typeComboBox.SelectedIndexChanged += new System.EventHandler(this.typeComboBox_SelectedIndexChanged);
|
||||
//
|
||||
// typeLabel
|
||||
//
|
||||
this.typeLabel.AutoSize = true;
|
||||
this.typeLabel.ForeColor = System.Drawing.Color.Black;
|
||||
this.typeLabel.Location = new System.Drawing.Point(15, 505);
|
||||
this.typeLabel.Name = "typeLabel";
|
||||
this.typeLabel.Size = new System.Drawing.Size(149, 13);
|
||||
this.typeLabel.TabIndex = 5;
|
||||
this.typeLabel.Text = "Select Foundation Slab Types";
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Location = new System.Drawing.Point(362, 524);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.cancelButton.TabIndex = 0;
|
||||
this.cancelButton.Text = "&Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// FoundationSlabForm
|
||||
//
|
||||
this.AcceptButton = this.okButton;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.cancelButton;
|
||||
this.ClientSize = new System.Drawing.Size(455, 566);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.typeLabel);
|
||||
this.Controls.Add(this.typeComboBox);
|
||||
this.Controls.Add(this.gridGroupBox);
|
||||
this.Controls.Add(this.diagramGroupBox);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "FoundationSlabForm";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Foundation Slab";
|
||||
this.Load += new System.EventHandler(this.FoundationSlabForm_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
|
||||
this.diagramGroupBox.ResumeLayout(false);
|
||||
this.gridGroupBox.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.PictureBox pictureBox;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.GroupBox diagramGroupBox;
|
||||
private System.Windows.Forms.GroupBox gridGroupBox;
|
||||
private System.Windows.Forms.DataGridView dataGridView;
|
||||
private System.Windows.Forms.ComboBox typeComboBox;
|
||||
private System.Windows.Forms.Label typeLabel;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.Button clearAllButton;
|
||||
private System.Windows.Forms.Button selectAllButton;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,226 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM 'AS IS' AND WITH ALL ITS FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Revit.SDK.Samples.FoundationSlab.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// A class to show properties and profiles of the foundation slabs.
|
||||
/// </summary>
|
||||
public partial class FoundationSlabForm : System.Windows.Forms.Form
|
||||
{
|
||||
// Revit datas for UI to display and operate.
|
||||
SlabData m_datas;
|
||||
|
||||
// The columns of DataGridView.
|
||||
DataGridViewCheckBoxColumn selectedColumn = new DataGridViewCheckBoxColumn();
|
||||
DataGridViewTextBoxColumn markColumn = new DataGridViewTextBoxColumn();
|
||||
DataGridViewTextBoxColumn levelNameColumn = new DataGridViewTextBoxColumn();
|
||||
DataGridViewTextBoxColumn slabTypeNameColumn = new DataGridViewTextBoxColumn();
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="datas">The object contains floors' datas.</param>
|
||||
public FoundationSlabForm(SlabData datas)
|
||||
{
|
||||
m_datas = datas;
|
||||
|
||||
InitializeComponent();
|
||||
InitializeDataGridView(); // DataGridView initialization.
|
||||
}
|
||||
|
||||
private void InitializeDataGridView()
|
||||
{
|
||||
// Edit the columns of the dataGridView.
|
||||
dataGridView.AutoGenerateColumns = false;
|
||||
dataGridView.Columns.AddRange(new DataGridViewColumn[] { selectedColumn, markColumn, levelNameColumn, slabTypeNameColumn });
|
||||
dataGridView.DataSource = m_datas.BaseSlabList;
|
||||
|
||||
// Select
|
||||
selectedColumn.DataPropertyName = "Selected";
|
||||
selectedColumn.HeaderText = "Select";
|
||||
selectedColumn.Name = "SelectedColumn";
|
||||
selectedColumn.ReadOnly = false;
|
||||
selectedColumn.Width = dataGridView.Width / 8;
|
||||
|
||||
// Mark
|
||||
markColumn.DataPropertyName = "Mark";
|
||||
markColumn.HeaderText = "Mark";
|
||||
markColumn.Name = "MarkColumn";
|
||||
markColumn.ReadOnly = true;
|
||||
markColumn.Width = dataGridView.Width / 9;
|
||||
|
||||
int remainWidth = dataGridView.Width - dataGridView.RowHeadersWidth - selectedColumn.Width - markColumn.Width;
|
||||
|
||||
// Level
|
||||
levelNameColumn.DataPropertyName = "LevelName";
|
||||
levelNameColumn.HeaderText = "Level";
|
||||
levelNameColumn.Name = "levelNameColumn";
|
||||
levelNameColumn.ReadOnly = true;
|
||||
levelNameColumn.Width = remainWidth / 2 - 2;
|
||||
|
||||
// Slab Type
|
||||
slabTypeNameColumn.DataPropertyName = "SlabTypeName";
|
||||
slabTypeNameColumn.HeaderText = "Slab Type";
|
||||
slabTypeNameColumn.Name = "SlabTypeNameColumn";
|
||||
slabTypeNameColumn.ReadOnly = true;
|
||||
slabTypeNameColumn.Width = remainWidth / 2;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Form load.
|
||||
/// </summary>
|
||||
/// <param name="sender">This object.</param>
|
||||
/// <param name="e">A object contains the event data.</param>
|
||||
private void FoundationSlabForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
okButton.Enabled = m_datas.CheckHaveSelected();
|
||||
typeComboBox.DataSource = m_datas.FoundationSlabTypeList;
|
||||
typeComboBox.DisplayMember = "Name";
|
||||
|
||||
if (0 == m_datas.BaseSlabList.Count)
|
||||
{
|
||||
selectAllButton.Enabled = false;
|
||||
clearAllButton.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cell value changed.
|
||||
/// </summary>
|
||||
/// <param name="sender">This object.</param>
|
||||
/// <param name="e">A object contains the event data.</param>
|
||||
private void dataGridView_CellValueChanged(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
okButton.Enabled = m_datas.CheckHaveSelected();
|
||||
pictureBox.Refresh();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cell click.
|
||||
/// </summary>
|
||||
/// <param name="sender">This object.</param>
|
||||
/// <param name="e">A object contains the event data.</param>
|
||||
private void dataGridView_CellClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
// Click on CheckBoxes.
|
||||
if ((e.ColumnIndex >= 0) && ("CheckBoxes" == dataGridView.Columns[e.ColumnIndex].Name))
|
||||
{
|
||||
EventArgs newE = new EventArgs();
|
||||
this.dataGridView_CurrentCellDirtyStateChanged(this, newE);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Current Cell Dirty State Changed.
|
||||
/// </summary>
|
||||
/// <param name="sender">This object.</param>
|
||||
/// <param name="e">A object contains the event data.</param>
|
||||
private void dataGridView_CurrentCellDirtyStateChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (dataGridView.IsCurrentCellDirty)
|
||||
{
|
||||
dataGridView.CommitEdit(DataGridViewDataErrorContexts.Commit); // Commit dataGridView.
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Paint.
|
||||
/// </summary>
|
||||
/// <param name="sender">This object.</param>
|
||||
/// <param name="e">A object contains the event data.</param>
|
||||
private void pictureBox_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
Sketch.DrawProfile(e.Graphics, pictureBox.DisplayRectangle, m_datas.BaseSlabList); // Draw profiles.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Click ok button.
|
||||
/// </summary>
|
||||
/// <param name="sender">This object.</param>
|
||||
/// <param name="e">A object contains the event data.</param>
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool IsSuccess = m_datas.CreateFoundationSlabs();
|
||||
if (IsSuccess)
|
||||
this.DialogResult = DialogResult.OK;
|
||||
else
|
||||
this.DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Click cancel button.
|
||||
/// </summary>
|
||||
/// <param name="sender">This object.</param>
|
||||
/// <param name="e">A object contains the event data.</param>
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Select type.
|
||||
/// </summary>
|
||||
/// <param name="sender">This object.</param>
|
||||
/// <param name="e">A object contains the event data.</param>
|
||||
private void typeComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
m_datas.FoundationSlabType = typeComboBox.SelectedItem;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Click selectAllButton.
|
||||
/// </summary>
|
||||
/// <param name="sender">This object.</param>
|
||||
/// <param name="e">A object contains the event data.</param>
|
||||
private void selectAllButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
m_datas.ChangeAllSelected(true);
|
||||
dataGridView.Refresh();
|
||||
okButton.Enabled = true;
|
||||
pictureBox.Refresh();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Click clearAllButton.
|
||||
/// </summary>
|
||||
/// <param name="sender">This object.</param>
|
||||
/// <param name="e">A object contains the event data.</param>
|
||||
private void clearAllButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
m_datas.ChangeAllSelected(false);
|
||||
dataGridView.Refresh();
|
||||
okButton.Enabled = false;
|
||||
pictureBox.Refresh();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,57 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM 'AS IS' AND WITH ALL ITS FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("FoundationSlab")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("FoundationSlab")]
|
||||
[assembly: AssemblyCopyright("Copyright © Autodesk, Inc. 2009")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("1863bbba-0551-4f9a-b55a-f3dccd6e2627")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,227 @@
|
||||
{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi31507\deflang1033\deflangfe2052\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}
|
||||
{\f13\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}SimSun{\*\falt \'cb\'ce\'cc\'e5};}{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}
|
||||
{\f39\fbidi \fnil\fcharset134\fprq1{\*\panose 00000000000000000000}Fixedsys{\*\falt Arial Unicode MS};}{\f75\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}@SimSun;}
|
||||
{\f183\fbidi \fnil\fcharset134\fprq1{\*\panose 00000000000000000000}@Fixedsys;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
|
||||
{\fdbmajor\f31501\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}SimSun{\*\falt \'cb\'ce\'cc\'e5};}{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;}
|
||||
{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
|
||||
{\fdbminor\f31505\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}SimSun{\*\falt \'cb\'ce\'cc\'e5};}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}
|
||||
{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f184\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f185\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
|
||||
{\f187\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f188\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f189\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f190\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
|
||||
{\f191\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f192\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f194\fbidi \fswiss\fcharset238\fprq2 Arial CE;}{\f195\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;}
|
||||
{\f197\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f198\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f199\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f200\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);}
|
||||
{\f201\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f202\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f316\fbidi \fnil\fcharset0\fprq2 SimSun Western{\*\falt \'cb\'ce\'cc\'e5};}{\f524\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}
|
||||
{\f525\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;}{\f527\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f528\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f531\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}
|
||||
{\f936\fbidi \fnil\fcharset0\fprq2 @SimSun Western;}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
|
||||
{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
|
||||
{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
|
||||
{\fdbmajor\f31520\fbidi \fnil\fcharset0\fprq2 SimSun Western{\*\falt \'cb\'ce\'cc\'e5};}{\fhimajor\f31528\fbidi \froman\fcharset238\fprq2 Cambria CE;}{\fhimajor\f31529\fbidi \froman\fcharset204\fprq2 Cambria Cyr;}
|
||||
{\fhimajor\f31531\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\fhimajor\f31532\fbidi \froman\fcharset162\fprq2 Cambria Tur;}{\fhimajor\f31535\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}
|
||||
{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
|
||||
{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
|
||||
{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
|
||||
{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
|
||||
{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
|
||||
{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbminor\f31560\fbidi \fnil\fcharset0\fprq2 SimSun Western{\*\falt \'cb\'ce\'cc\'e5};}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}
|
||||
{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}
|
||||
{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
|
||||
{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
|
||||
{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}
|
||||
{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;
|
||||
\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\*\defchp \fs22\loch\af31506\hich\af31506\dbch\af31505 }{\*\defpap \ql \li0\ri0\sa200\sl276\slmult1
|
||||
\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025
|
||||
\ltrch\fcs0 \fs22\lang1033\langfe2052\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 \snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\*
|
||||
\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa200\sl276\slmult1
|
||||
\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe2052\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052
|
||||
\snext11 \ssemihidden \sunhideused \sqformat Normal Table;}}{\*\rsidtbl \rsid1709986\rsid3033555}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\operator Carl Zhang}
|
||||
{\creatim\yr2010\mo3\dy4\hr16\min50}{\revtim\yr2010\mo3\dy4\hr16\min53}{\version3}{\edmins3}{\nofpages2}{\nofwords372}{\nofchars2157}{\nofcharsws2524}{\vern32771}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}
|
||||
\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect
|
||||
\widowctrl\ftnbj\aenddoc\trackmoves1\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120\dghorigin1701
|
||||
\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\rsidroot3033555 \fet0{\*\wgrffmtfilter 2450}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2
|
||||
\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6
|
||||
\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang
|
||||
{\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \fs22\lang1033\langfe2052\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp2052 {
|
||||
\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 Application:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 FoundationSlab\line }{\rtlch\fcs1 \ab\af1\afs20
|
||||
\ltrch\fcs0 \b\f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 Revit Platform:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 All\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid1709986
|
||||
\hich\af1\dbch\af31505\loch\f1 Revit Version:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 2011.0\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1
|
||||
First Released For:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 9.1\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 Programming Language:}{\rtlch\fcs1
|
||||
\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 C#\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 Skill Level:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 Medium\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 Category:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1709986
|
||||
\hich\af1\dbch\af31505\loch\f1 Elements\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 Type:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1
|
||||
ExternalCommand\line \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 Subject:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 Create Foundation Slab.\line
|
||||
}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 Summary:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 \line \hich\af1\dbch\af31505\loch\f1
|
||||
This sample demonstrates how to create Foundation Slab.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid1709986
|
||||
\par
|
||||
\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 Classes:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1
|
||||
\par }\pard \ltrpar\ql \fi360\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid3033555
|
||||
\hich\af1\dbch\af31505\loch\f1 UI.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 IExternalCommand
|
||||
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 DB}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 .Floor
|
||||
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 DB}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 .FloorType
|
||||
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 DB}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 .Document
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid1709986
|
||||
\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 Project Files:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0
|
||||
\f0\fs20\cf2\insrsid1709986
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 Command.cs
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1
|
||||
This file contains the class Command which implements interface IExternalCommand. It creates an instance of SlabData for FoundationSlabForm and show the form.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid1709986
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid1709986
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 RegularSlab.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid1709986
|
||||
\par }\pard \ltrpar\ql \li401\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin401\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 This file contains }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\f1\fs20\lang1024\langfe1024\noproof\insrsid1709986 \hich\af1\dbch\af31505\loch\f1 a class of regular slab.}{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \fs20\cf11\lang1024\langfe1024\loch\af39\hich\af1\dbch\af39\noproof\insrsid1709986
|
||||
\hich\af1\dbch\af39\loch\f39 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\lang1024\langfe1024\loch\af1\hich\af1\dbch\af39\noproof\insrsid1709986 \hich\af1\dbch\af39\loch\f1 Create an octagonal profile for the f\hich\af1\dbch\af39\loch\f1
|
||||
loor according to its bounding box}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af39\insrsid1709986
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af39\insrsid1709986
|
||||
\par \hich\af1\dbch\af39\loch\f1 FoundationSlabForm.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af39\insrsid1709986
|
||||
\par }\pard \ltrpar\ql \fi400\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af39\insrsid1709986 \hich\af1\dbch\af39\loch\f1 This file contains }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\fs20\lang1024\langfe1024\loch\af1\hich\af1\dbch\af39\noproof\insrsid1709986 \hich\af1\dbch\af39\loch\f1 a class to show properties and profiles of the foundation slabs.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af39\insrsid1709986
|
||||
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af39\insrsid1709986
|
||||
\par \hich\af1\dbch\af39\loch\f1 SlabData.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af39\insrsid1709986
|
||||
\par }\pard \ltrpar\ql \li358\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin358\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\lang1024\langfe1024\loch\af1\hich\af1\dbch\af39\noproof\insrsid1709986 \hich\af1\dbch\af39\loch\f1 This file }{\rtlch\fcs1 \af1\afs20
|
||||
\ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af39\insrsid1709986 \hich\af1\dbch\af39\loch\f1 contains a class SlabData that is a mediator between RevitAPI and FoundationSlabForm}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\fs20\lang1024\langfe1024\loch\af1\hich\af1\dbch\af39\noproof\insrsid1709986 \hich\af1\dbch\af39\loch\f1 . It ha\hich\af1\dbch\af39\loch\f1
|
||||
s a collection of functions to create FoundationSlabs, find out all regular horizontal slabs, get the floor profile, verify whether the floor is planar etc.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af39\insrsid1709986
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af39\insrsid1709986
|
||||
\par \hich\af1\dbch\af39\loch\f1 Sketch.cs
|
||||
\par }\pard \ltrpar\ql \fi400\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af39\insrsid1709986 \hich\af1\dbch\af39\loch\f1 This file contains }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\fs20\lang1024\langfe1024\loch\af1\hich\af1\dbch\af39\noproof\insrsid1709986 \hich\af1\dbch\af39\loch\f1 an internal class for drawing slabs' profiles}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af39\insrsid1709986 .}{\rtlch\fcs1
|
||||
\af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af39\insrsid1709986
|
||||
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af39\insrsid1709986
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\loch\af1\hich\af1\dbch\af39\insrsid1709986 \hich\af1\dbch\af39\loch\f1 Description:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\fs20\loch\af1\hich\af1\dbch\af39\insrsid1709986 \hich\af1\dbch\af39\loch\f1 }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af39\insrsid1709986
|
||||
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af39\insrsid1709986 -\tab \hich\af1\dbch\af39\loch\f1
|
||||
To get slabs, iterate through the document looking for \hich\f1 \lquote \loch\f1 Floor\hich\f1 \rquote \loch\f1 objects.
|
||||
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af39\insrsid1709986 -\tab \hich\af1\dbch\af39\loch\f1
|
||||
The Mark property can be found in floor parameter: BuiltInParameter.ALL_MODEL_MARK.
|
||||
\par -\tab \hich\af1\dbch\af39\loch\f1 Foundation slab types can be found by iterating through the document looking for \hich\f1 \lquote \loch\f1 FloorType\hich\f1 \rquote \loch\f1 obj\hich\af1\dbch\af39\loch\f1 ects with category named \hich\f1 \lquote
|
||||
\loch\f1 Structural Foundations\hich\f1 \rquote .
|
||||
\par -\tab \hich\af1\dbch\af39\loch\f1 A Foundation Slab can be created by \hich\f1 \lquote \loch\f1 NewFloor\hich\f1 \rquote \loch\f1 method with the given horizontal profile and using a specified foundation slab style.
|
||||
\par -\tab \hich\af1\dbch\af39\loch\f1 Structural slab's profile can be found in its AnalyticalModel prope\hich\af1\dbch\af39\loch\f1 rty. Nonstructural floor's profile can be formed through its Geometry property.
|
||||
\par -\tab \hich\af1\dbch\af39\loch\f1 The octagonal profile is an array of planar lines that represent the horizontal profile of the octagonal foundation slab.
|
||||
\par -\tab \hich\af1\dbch\af39\loch\f1 Make sure the profile of slab is a closed outline,\hich\af1\dbch\af39\loch\f1 or else it could not be created by Revit.
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af39\insrsid1709986
|
||||
\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\loch\af1\hich\af1\dbch\af39\insrsid1709986 \hich\af1\dbch\af39\loch\f1 Instructions:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf2\loch\af1\hich\af1\dbch\af39\insrsid1709986 \hich\af1\dbch\af39\loch\f1 }{
|
||||
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af39\insrsid1709986
|
||||
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af39\insrsid1709986 \hich\af1\dbch\af39\loch\f1 1.\tab Prepare your Revit project.
|
||||
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af39\insrsid1709986 \hich\af1\dbch\af39\loch\f1
|
||||
Open or new a Revit project and make sure there are some floors in the document. A sample project file FoundationSlab.rvt is available in the sample\hich\f1 \rquote \loch\f1 s folder}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0
|
||||
\fs20\loch\af0\hich\af0\dbch\af39\insrsid1709986 .}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af39\insrsid1709986
|
||||
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af39\insrsid1709986 \hich\af1\dbch\af39\loch\f1 2.\tab \hich\af1\dbch\af39\loch\f1 Run the command.
|
||||
|
||||
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af39\insrsid1709986 \hich\af1\dbch\af39\loch\f1 3.\tab
|
||||
In the Regular Slabs group, select the floors you want to make change.
|
||||
\par \hich\af1\dbch\af39\loch\f1 4.\tab In the bottom of the dialog, select the Foundation Slab Type to be applied}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af39\insrsid1709986 .}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
|
||||
\fs20\loch\af1\hich\af1\dbch\af39\insrsid1709986
|
||||
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af39\insrsid1709986 \hich\af1\dbch\af39\loch\f1 5.\tab
|
||||
You can see the preview of the converting results in the Picture Box. Click OK butt\hich\af1\dbch\af39\loch\f1 on to create octagonal slabs for the selected floors}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\loch\af0\hich\af0\dbch\af39\insrsid1709986 .}{
|
||||
\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af39\insrsid1709986
|
||||
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\loch\af1\hich\af1\dbch\af39\insrsid1709986
|
||||
\par }{\*\themedata 504b030414000600080000002100828abc13fa0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb6ac3301045f785fe83d0b6d8
|
||||
72ba28a5d8cea249777d2cd20f18e4b12d6a8f843409c9df77ecb850ba082d74231062ce997b55ae8fe3a00e1893f354e9555e6885647de3a8abf4fbee29bbd7
|
||||
2a3150038327acf409935ed7d757e5ee14302999a654e99e393c18936c8f23a4dc072479697d1c81e51a3b13c07e4087e6b628ee8cf5c4489cf1c4d075f92a0b
|
||||
44d7a07a83c82f308ac7b0a0f0fbf90c2480980b58abc733615aa2d210c2e02cb04430076a7ee833dfb6ce62e3ed7e14693e8317d8cd0433bf5c60f53fea2fe7
|
||||
065bd80facb647e9e25c7fc421fd2ddb526b2e9373fed4bb902e182e97b7b461e6bfad3f010000ffff0300504b030414000600080000002100a5d6a7e7c00000
|
||||
00360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4fc7060abb08
|
||||
84a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b63095120f88d94fbc
|
||||
52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462a1a82fe353
|
||||
bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f7468656d652f7468
|
||||
656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b4b0d592c9c
|
||||
070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b4757e8d3f7
|
||||
29e245eb2b260a0238fd010000ffff0300504b03041400060008000000210096b5ade296060000501b0000160000007468656d652f7468656d652f7468656d65
|
||||
312e786d6cec594f6fdb3614bf0fd87720746f6327761a07758ad8b19b2d4d1bc46e871e698996d850a240d2497d1bdae38001c3ba618715d86d87615b8116d8
|
||||
a5fb34d93a6c1dd0afb0475292c5585e9236d88aad3e2412f9e3fbff1e1fa9abd7eec70c1d1221294fda5efd72cd4324f1794093b0eddd1ef62fad79482a9c04
|
||||
98f184b4bd2991deb58df7dfbb8ad755446282607d22d771db8b944ad79796a40fc3585ee62949606ecc458c15bc8a702910f808e8c66c69b9565b5d8a314d3c
|
||||
94e018c8de1a8fa94fd05093f43672e23d06af89927ac06762a049136785c10607758d9053d965021d62d6f6804fc08f86e4bef210c352c144dbab999fb7b471
|
||||
7509af678b985ab0b6b4ae6f7ed9ba6c4170b06c788a705430adf71bad2b5b057d03606a1ed7ebf5babd7a41cf00b0ef83a6569632cd467faddec9699640f671
|
||||
9e76b7d6ac355c7c89feca9cccad4ea7d36c65b258a206641f1b73f8b5da6a6373d9c11b90c537e7f08dce66b7bbeae00dc8e257e7f0fd2badd5868b37a088d1
|
||||
e4600ead1ddaef67d40bc898b3ed4af81ac0d76a197c86826828a24bb318f3442d8ab518dfe3a20f000d6458d104a9694ac6d88728eee2782428d60cf03ac1a5
|
||||
193be4cbb921cd0b495fd054b5bd0f530c1931a3f7eaf9f7af9e3f45c70f9e1d3ff8e9f8e1c3e3073f5a42ceaa6d9c84e5552fbffdeccfc71fa33f9e7ef3f2d1
|
||||
17d57859c6fffac327bffcfc793510d26726ce8b2f9ffcf6ecc98baf3efdfdbb4715f04d814765f890c644a29be408edf3181433567125272371be15c308d3f2
|
||||
8acd249438c19a4b05fd9e8a1cf4cd296699771c393ac4b5e01d01e5a30a787d72cf1178108989a2159c77a2d801ee72ce3a5c545a6147f32a99793849c26ae6
|
||||
6252c6ed637c58c5bb8b13c7bfbd490a75330f4b47f16e441c31f7184e140e494214d273fc80900aedee52ead87597fa824b3e56e82e451d4c2b4d32a423279a
|
||||
668bb6690c7e9956e90cfe766cb37b077538abd27a8b1cba48c80acc2a841f12e698f13a9e281c57911ce298950d7e03aba84ac8c154f8655c4f2af074481847
|
||||
bd804859b5e696007d4b4edfc150b12addbecba6b18b148a1e54d1bc81392f23b7f84137c2715a851dd0242a633f900710a218ed715505dfe56e86e877f0034e
|
||||
16bafb0e258ebb4faf06b769e888340b103d3311da9750aa9d0a1cd3e4efca31a3508f6d0c5c5c398602f8e2ebc71591f5b616e24dd893aa3261fb44f95d843b
|
||||
5974bb5c04f4edafb95b7892ec1108f3f98de75dc97d5772bdff7cc95d94cf672db4b3da0a6557f70db629362d72bcb0431e53c6066acac80d699a6409fb44d0
|
||||
8741bdce9c0e4971624a2378cceaba830b05366b90e0ea23aaa241845368b0eb9e2612ca8c742851ca251ceccc70256d8d87265dd96361531f186c3d9058edf2
|
||||
c00eafe8e1fc5c509031bb4d680e9f39a3154de0accc56ae644441edd76156d7429d995bdd88664a9dc3ad50197c38af1a0c16d684060441db02565e85f3b966
|
||||
0d0713cc48a0ed6ef7dedc2dc60b17e92219e180643ed27acffba86e9c94c78ab90980d8a9f0913ee49d62b512b79626fb06dccee2a432bbc60276b9f7dec44b
|
||||
7904cfbca4f3f6443ab2a49c9c2c41476dafd55c6e7ac8c769db1bc399161ee314bc2e75cf8759081743be1236ec4f4d6693e5336fb672c5dc24a8c33585b5fb
|
||||
9cc24e1d4885545b58463634cc5416022cd19cacfccb4d30eb45296023fd35a458598360f8d7a4003bbaae25e331f155d9d9a5116d3bfb9a95523e51440ca2e0
|
||||
088dd844ec6370bf0e55d027a012ae264c45d02f708fa6ad6da6dce29c255df9f6cae0ec38666984b372ab5334cf640b37795cc860de4ae2816e95b21be5ceaf
|
||||
8a49f90b52a51cc6ff3355f47e0237052b81f6800fd7b802239daf6d8f0b1571a8426944fdbe80c6c1d40e8816b88b8569082ab84c36ff0539d4ff6dce591a26
|
||||
ade1c0a7f669880485fd484582903d284b26fa4e2156cff62e4b9265844c4495c495a9157b440e091bea1ab8aaf7760f4510eaa69a6465c0e04ec69ffb9e65d0
|
||||
28d44d4e39df9c1a52ecbd3607fee9cec7263328e5d661d3d0e4f62f44acd855ed7ab33cdf7bcb8ae889599bd5c8b3029895b6825696f6af29c239b75a5bb1e6
|
||||
345e6ee6c28117e73586c1a2214ae1be07e93fb0ff51e133fb65426fa843be0fb515c187064d0cc206a2fa926d3c902e907670048d931db4c1a44959d366ad93
|
||||
b65abe595f70a75bf03d616c2dd959fc7d4e6317cd99cbcec9c58b34766661c7d6766ca1a9c1b327531486c6f941c638c67cd22a7f75e2a37be0e82db8df9f30
|
||||
254d30c1372581a1f51c983c80e4b71ccdd28dbf000000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468656d652f74
|
||||
68656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4350d363f24
|
||||
51eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d262452282e3198
|
||||
720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe514173d9850528
|
||||
a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100828abc13fa0000001c0200001300000000000000000000000000
|
||||
000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b000000000000000000000000
|
||||
002b0100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c00000000000000000000000000140200007468
|
||||
656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d001400060008000000210096b5ade296060000501b000016000000000000000000
|
||||
00000000d10200007468656d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b010000270000000000
|
||||
00000000000000009b0900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000960a00000000}
|
||||
{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d
|
||||
617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169
|
||||
6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363
|
||||
656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e}
|
||||
{\*\latentstyles\lsdstimax267\lsdlockeddef0\lsdsemihiddendef1\lsdunhideuseddef1\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4;
|
||||
\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9;
|
||||
\lsdpriority39 \lsdlocked0 toc 1;\lsdpriority39 \lsdlocked0 toc 2;\lsdpriority39 \lsdlocked0 toc 3;\lsdpriority39 \lsdlocked0 toc 4;\lsdpriority39 \lsdlocked0 toc 5;\lsdpriority39 \lsdlocked0 toc 6;\lsdpriority39 \lsdlocked0 toc 7;
|
||||
\lsdpriority39 \lsdlocked0 toc 8;\lsdpriority39 \lsdlocked0 toc 9;\lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdpriority1 \lsdlocked0 Default Paragraph Font;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority22 \lsdlocked0 Strong;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority59 \lsdlocked0 Table Grid;\lsdunhideused0 \lsdlocked0 Placeholder Text;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 1;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdunhideused0 \lsdlocked0 Revision;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 1;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 2;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 2;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 2;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 3;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 3;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 4;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 4;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 4;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 5;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 5;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 5;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 6;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 6;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;
|
||||
\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdpriority37 \lsdlocked0 Bibliography;\lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;}}{\*\datastore 010500000200000018000000
|
||||
4d73786d6c322e534158584d4c5265616465722e352e3000000000000000000000060000
|
||||
d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||
ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffffec69d9888b8b3d4c859eaf6cd158be0f000000000000000000000000b0cc
|
||||
b01878bbca01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000105000000000000}}
|
||||
@@ -0,0 +1,191 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM 'AS IS' AND WITH ALL ITS FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.DB.Structure;
|
||||
|
||||
namespace Revit.SDK.Samples.FoundationSlab.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// A class of regular slab.
|
||||
/// </summary>
|
||||
public class RegularSlab
|
||||
{
|
||||
bool m_selected = true; // Be selected or not.
|
||||
string m_mark; // The mark of the slab.
|
||||
Level m_level; // The level of the slab.
|
||||
ElementType m_type; // The type of the slab.
|
||||
|
||||
Autodesk.Revit.DB.ElementId m_id; // The id of the slab.
|
||||
CurveArray m_profile; // The profile of the slab.
|
||||
CurveArray m_octagonalProfile; // The octagonal profile of the slab.
|
||||
BoundingBoxXYZ m_maxBBox; // The max bounding box of the slab.
|
||||
|
||||
/// <summary>
|
||||
/// Selected property.
|
||||
/// </summary>
|
||||
public bool Selected
|
||||
{
|
||||
get { return m_selected; }
|
||||
set { m_selected = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Mark property.
|
||||
/// </summary>
|
||||
public string Mark
|
||||
{
|
||||
get { return m_mark; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// LevelName property.
|
||||
/// </summary>
|
||||
public string LevelName
|
||||
{
|
||||
get { return m_level.Name; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SlabTypeName property.
|
||||
/// </summary>
|
||||
public string SlabTypeName
|
||||
{
|
||||
get { return m_type.Name; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Id property.
|
||||
/// </summary>
|
||||
public Autodesk.Revit.DB.ElementId Id
|
||||
{
|
||||
get { return m_id; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Profile property.
|
||||
/// </summary>
|
||||
public CurveArray Profile
|
||||
{
|
||||
get { return m_profile; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OctagonalProfile property.
|
||||
/// </summary>
|
||||
public CurveArray OctagonalProfile
|
||||
{
|
||||
get { return m_octagonalProfile; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// BBox property.
|
||||
/// </summary>
|
||||
public BoundingBoxXYZ BBox
|
||||
{
|
||||
get { return m_maxBBox; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="floor">The floor object.</param>
|
||||
/// <param name="floorProfile">The floor's profile.</param>
|
||||
/// <param name="bBox">The floor's bounding box.</param>
|
||||
public RegularSlab(Floor floor, CurveArray floorProfile, BoundingBoxXYZ bBox)
|
||||
{
|
||||
// Get floor's properties.
|
||||
if (null != floor)
|
||||
{
|
||||
// Get floor's Mark property.
|
||||
Parameter markPara = floor.get_Parameter(BuiltInParameter.ALL_MODEL_MARK);
|
||||
if (null != markPara)
|
||||
{
|
||||
m_mark = markPara.AsString();
|
||||
}
|
||||
|
||||
m_level = floor.Document.GetElement(floor.LevelId) as Level; // Get floor's level.
|
||||
m_type = floor.Document.GetElement(floor.GetTypeId()) as ElementType;// Get floor's type.
|
||||
m_id = floor.Id; // Get floor's Id.
|
||||
m_profile = floorProfile; // Get floor's profile.
|
||||
}
|
||||
|
||||
// Create an octagonal profile for the floor according to it's bounding box.
|
||||
if (null != bBox)
|
||||
{
|
||||
CreateOctagonProfile(bBox.Min, bBox.Max);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create an octagonal profile.
|
||||
/// </summary>
|
||||
/// <param name="min">The min point of the floor's bounding box.</param>
|
||||
/// <param name="max">The max point of the floor's bounding box.</param>
|
||||
/// <returns>The bool value suggests successful or not.</returns>
|
||||
private bool CreateOctagonProfile(Autodesk.Revit.DB.XYZ min, Autodesk.Revit.DB.XYZ max)
|
||||
{
|
||||
// Calculate the x/y offset.
|
||||
double xOffset = Math.Abs(max.Y - min.Y) / 8;
|
||||
double yOffset = Math.Abs(max.X - min.X) / 8;
|
||||
double z = max.Z;
|
||||
|
||||
// Calculate the eight points of the octagon.
|
||||
Autodesk.Revit.DB.XYZ[] points = new Autodesk.Revit.DB.XYZ[8];
|
||||
points[0] = new Autodesk.Revit.DB.XYZ(min.X, min.Y, z);
|
||||
points[1] = new Autodesk.Revit.DB.XYZ((min.X + max.X) / 2, (min.Y - yOffset), z);
|
||||
points[2] = new Autodesk.Revit.DB.XYZ(max.X, min.Y, z);
|
||||
points[3] = new Autodesk.Revit.DB.XYZ((max.X + xOffset), (min.Y + max.Y) / 2, z);
|
||||
points[4] = new Autodesk.Revit.DB.XYZ(max.X, max.Y, z);
|
||||
points[5] = new Autodesk.Revit.DB.XYZ((min.X + max.X) / 2, (max.Y + yOffset), z);
|
||||
points[6] = new Autodesk.Revit.DB.XYZ(min.X, max.Y, z);
|
||||
points[7] = new Autodesk.Revit.DB.XYZ((min.X - xOffset), (min.Y + max.Y) / 2, z);
|
||||
|
||||
// Get the octagonal profile.
|
||||
m_octagonalProfile = new CurveArray();
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
Line line;
|
||||
if (7 == i)
|
||||
line = Line.CreateBound(points[i], points[0]);
|
||||
else
|
||||
line = Line.CreateBound(points[i], points[i + 1]);
|
||||
m_octagonalProfile.Append(line);
|
||||
}
|
||||
|
||||
// Get the octagonal profile's bounding box.
|
||||
Autodesk.Revit.DB.XYZ newMin = new Autodesk.Revit.DB.XYZ(min.X - xOffset, min.Y - yOffset, z);
|
||||
Autodesk.Revit.DB.XYZ newMax = new Autodesk.Revit.DB.XYZ(max.X + xOffset, max.Y + yOffset, z);
|
||||
m_maxBBox = new BoundingBoxXYZ();
|
||||
m_maxBBox.Min = newMin;
|
||||
m_maxBBox.Max = newMax;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM 'AS IS' AND WITH ALL ITS FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
using Autodesk.Revit.DB;
|
||||
|
||||
namespace Revit.SDK.Samples.FoundationSlab.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// An internal class for drawing slabs' profiles.
|
||||
/// This class is intended to contain only static methods.
|
||||
/// </summary>
|
||||
class Sketch
|
||||
{
|
||||
// A private constructor to prevent the compiler from generating a default constructor.
|
||||
private Sketch() { }
|
||||
|
||||
/// <summary>
|
||||
/// Draw profiles.
|
||||
/// </summary>
|
||||
/// <param name="graphic">The object of Graphics to draw profiles.</param>
|
||||
/// <param name="rclip">The rectangle area to draw profiles.</param>
|
||||
/// <param name="baseSlabList">A set of base floors' datas containing profiles.</param>
|
||||
public static void DrawProfile(Graphics graphic, RectangleF rclip, Collection<RegularSlab> baseSlabList)
|
||||
{
|
||||
RectangleF maxBBox = GetMaxBBox(baseSlabList); // Get the max bounding box's rectangle area.
|
||||
Matrix matrix = GetTransformMatrix(rclip, maxBBox); // Get the transform matrix.
|
||||
if (null == matrix)
|
||||
return;
|
||||
|
||||
graphic.Clear(System.Drawing.Color.Black); // Clear the object of graphics.
|
||||
graphic.Transform = matrix; // Transform the object of graphics.
|
||||
graphic.SmoothingMode = SmoothingMode.HighQuality; // Smooth it.
|
||||
|
||||
// Two pens for drawing profiles.
|
||||
Pen yellowPen = new Pen(System.Drawing.Color.Yellow, (float)0.05); // For floors' profiles.
|
||||
Pen greenPen = new Pen(System.Drawing.Color.Green, (float)0.2); // For octagonal profiles.
|
||||
|
||||
// Draw profiles.
|
||||
foreach (RegularSlab slab in baseSlabList)
|
||||
{
|
||||
if (null != slab.Profile)
|
||||
{
|
||||
DrawLine(yellowPen, graphic, slab.Profile); // Draw floor's profiles.
|
||||
}
|
||||
if (slab.Selected)
|
||||
{
|
||||
DrawLine(greenPen,graphic, slab.OctagonalProfile); // Draw octagonal profiles.
|
||||
}
|
||||
}
|
||||
|
||||
// Dispose pen and matrix.
|
||||
yellowPen.Dispose();
|
||||
greenPen.Dispose();
|
||||
matrix.Dispose();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draw Lines.
|
||||
/// </summary>
|
||||
/// <param name="pen">The pen to draw lines.</param>
|
||||
/// <param name="graphic">The object of graphics to draw lines.</param>
|
||||
/// <param name="curveArray">A set contains lines.</param>
|
||||
private static void DrawLine(Pen pen, Graphics graphic, CurveArray curveArray)
|
||||
{
|
||||
foreach (Curve curve in curveArray)
|
||||
{
|
||||
Line line = curve as Line; // Draw one line.
|
||||
if (null != line)
|
||||
{
|
||||
PointF startPoint = new PointF((float)line.GetEndPoint(0).X, (float)line.GetEndPoint(0).Y);
|
||||
PointF endPoint = new PointF((float)line.GetEndPoint(1).X, (float)line.GetEndPoint(1).Y);
|
||||
graphic.DrawLine(pen, startPoint, endPoint);
|
||||
continue;
|
||||
}
|
||||
List<XYZ> xyzArray = curve.Tessellate() as List<XYZ>; // Draw lines which form one arc.
|
||||
for (int i = 0; i < (xyzArray.Count - 1); i++)
|
||||
{
|
||||
PointF startPoint = new PointF((float)xyzArray[i].X, (float)xyzArray[i].Y);
|
||||
PointF endPoint = new PointF((float)xyzArray[i + 1].X, (float)xyzArray[i + 1].Y);
|
||||
graphic.DrawLine(pen, startPoint, endPoint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get transform matrix.
|
||||
/// </summary>
|
||||
/// <param name="rclip">The rectangle area to draw profiles.</param>
|
||||
/// <param name="rBox">the rectangle area of the all the floors' max bounding box.</param>
|
||||
/// <returns>The transform matrix.</returns>
|
||||
private static Matrix GetTransformMatrix(RectangleF rclip, RectangleF rBox)
|
||||
{
|
||||
try
|
||||
{
|
||||
RectangleF rdraw = rclip;
|
||||
|
||||
// Calculate the draw area according to the size of the sketch:
|
||||
// Adjust the shrink to change borders
|
||||
float shrink = (float)0.15, shrinked = (float)1.0 - 2 * shrink;
|
||||
if (rBox.Width * rclip.Height > rBox.Height * rclip.Width)
|
||||
rdraw.Inflate(-rclip.Width * shrink, (rclip.Width * shrinked * (float)rBox.Height / (float)rBox.Width - rclip.Height) / 2);
|
||||
else
|
||||
rdraw.Inflate((rclip.Height * shrinked * (float)rBox.Width / (float)rBox.Height - rclip.Width) / 2, -rclip.Height * shrink);
|
||||
|
||||
// Mapping the point in sketch to point in draw area:
|
||||
PointF[] plgpts = new PointF[3];
|
||||
plgpts[0].X = rdraw.Left;
|
||||
plgpts[0].Y = rdraw.Bottom;
|
||||
plgpts[1].X = rdraw.Right;
|
||||
plgpts[1].Y = rdraw.Bottom;
|
||||
plgpts[2].X = rdraw.Left;
|
||||
plgpts[2].Y = rdraw.Top;
|
||||
|
||||
// Get the transform matrix and return.
|
||||
return new Matrix(rBox, plgpts);
|
||||
}
|
||||
catch (ArithmeticException)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
catch (OutOfMemoryException)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the max bounding box of all floors.
|
||||
/// </summary>
|
||||
/// <param name="baseSlabList">A set of base floors' datas containing bounding box.</param>
|
||||
/// <returns>The rectangle area of all the base floors' max bounding box.</returns>
|
||||
private static RectangleF GetMaxBBox(Collection<RegularSlab> baseSlabList)
|
||||
{
|
||||
int count = 1;
|
||||
RectangleF union = new RectangleF();
|
||||
foreach (RegularSlab slab in baseSlabList)
|
||||
{
|
||||
float x = (float)(slab.BBox.Min.X);
|
||||
float y = (float)(slab.BBox.Min.Y);
|
||||
float width = (float)(slab.BBox.Max.X - slab.BBox.Min.X);
|
||||
float height = (float)(slab.BBox.Max.Y - slab.BBox.Min.Y);
|
||||
RectangleF slabBox = new RectangleF(x,y,width,height); // Rectangle area of each floor.
|
||||
if(1 == count)
|
||||
{
|
||||
union = slabBox;
|
||||
}
|
||||
else
|
||||
{
|
||||
union = RectangleF.Union(union, slabBox); // The union of all the floors' rectangle areas.
|
||||
}
|
||||
count++;
|
||||
}
|
||||
return union;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,348 @@
|
||||
//
|
||||
// (C) Copyright 2003-2019 by Autodesk, Inc.
|
||||
//
|
||||
// Permission to use, copy, modify, and distribute this software in
|
||||
// object code form for any purpose and without fee is hereby granted
|
||||
// provided that the above copyright notice appears in all copies and
|
||||
// that both that copyright notice and the limited warranty and
|
||||
// restricted rights notice below appear in all supporting
|
||||
// documentation.
|
||||
//
|
||||
// AUTODESK PROVIDES THIS PROGRAM 'AS IS' AND WITH ALL ITS FAULTS.
|
||||
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
|
||||
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
|
||||
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
|
||||
// UNINTERRUPTED OR ERROR FREE.
|
||||
//
|
||||
// Use, duplication, or disclosure by the U.S. Government is subject to
|
||||
// restrictions set forth in FAR 52.227-19 (Commercial Computer
|
||||
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
|
||||
// (Rights in Technical Data and Computer Software), as applicable.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
using Autodesk.Revit.ApplicationServices;
|
||||
using Autodesk.Revit.DB.Structure;
|
||||
|
||||
namespace Revit.SDK.Samples.FoundationSlab.CS
|
||||
{
|
||||
/// <summary>
|
||||
/// A class collecting all useful datas from revit API for UI.
|
||||
/// </summary>
|
||||
public class SlabData
|
||||
{
|
||||
const double PlanarPrecision = 0.00033;
|
||||
|
||||
// For finding elements and creating foundations slabs.
|
||||
public static Autodesk.Revit.UI.UIApplication m_revit;
|
||||
public static Autodesk.Revit.Creation.Application CreApp;
|
||||
// Foundation slab type for creating foundation slabs.
|
||||
FloorType m_foundationSlabType;
|
||||
// A set of levels to find out the lowest level of the building.
|
||||
SortedList<double, Level> m_levelList = new SortedList<double, Level>();
|
||||
// A set of views to find out the regular slab's bounding box.
|
||||
List<View> m_viewList = new List<View>();
|
||||
// A set of floors to find out all the regular slabs at the base of the building.
|
||||
List<Floor> m_floorList = new List<Floor>();
|
||||
|
||||
// A set of regular slabs at the base of the building.
|
||||
// This set supplies all the regular slabs' datas for UI.
|
||||
List<RegularSlab> m_allBaseSlabList = new List<RegularSlab>();
|
||||
|
||||
// A set of the types of foundation slab.
|
||||
// This set supplies all the types of foundation slab for UI.
|
||||
List<FloorType> m_slabTypeList = new List<FloorType>();
|
||||
|
||||
/// <summary>
|
||||
/// BaseSlabList property.
|
||||
/// This property is for UI. It can be edited by user.
|
||||
/// </summary>
|
||||
public Collection<RegularSlab> BaseSlabList
|
||||
{
|
||||
get { return new Collection<RegularSlab>(m_allBaseSlabList); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// FoundationSlabTypeList property.
|
||||
/// This property is for UI. It can not be edited by user.
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<FloorType> FoundationSlabTypeList
|
||||
{
|
||||
get { return new ReadOnlyCollection<FloorType>(m_slabTypeList); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// FoundationSlabType property.
|
||||
/// This property gets value from UI to create foundation slabs.
|
||||
/// </summary>
|
||||
public object FoundationSlabType
|
||||
{
|
||||
set { m_foundationSlabType = value as FloorType; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="revit">An application object that contains data related to revit command.</param>
|
||||
public SlabData(UIApplication revit)
|
||||
{
|
||||
m_revit = revit;
|
||||
CreApp = m_revit.Application.Create;
|
||||
// Find out all useful elements.
|
||||
FindElements();
|
||||
// Get all base slabs. If no slab be found, throw an exception and return cancel.
|
||||
if (!GetAllBaseSlabs())
|
||||
throw new NullReferenceException("No planar slabs at the base of the building.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check whether a regular slab is selected.
|
||||
/// </summary>
|
||||
/// <returns>The bool value suggest being selected or not.</returns>
|
||||
public bool CheckHaveSelected()
|
||||
{
|
||||
foreach (RegularSlab slab in m_allBaseSlabList)
|
||||
{
|
||||
if (slab.Selected)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Change the Selected property for all regular slabs.
|
||||
/// </summary>
|
||||
/// <param name="value">The value for Selected property</param>
|
||||
public void ChangeAllSelected(bool value)
|
||||
{
|
||||
foreach (RegularSlab slab in m_allBaseSlabList)
|
||||
{
|
||||
slab.Selected = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create foundation slabs.
|
||||
/// </summary>
|
||||
/// <returns>The bool value suggest successful or not.</returns>
|
||||
public bool CreateFoundationSlabs()
|
||||
{
|
||||
// Create a foundation slab for each selected regular slab.
|
||||
foreach (RegularSlab slab in m_allBaseSlabList)
|
||||
{
|
||||
if (!slab.Selected)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Create a new slab.
|
||||
Autodesk.Revit.DB.XYZ normal = new Autodesk.Revit.DB.XYZ(0, 0, 1);
|
||||
Transaction t = new Transaction(m_revit.ActiveUIDocument.Document, Guid.NewGuid().GetHashCode().ToString());
|
||||
t.Start();
|
||||
Floor foundationSlab = m_revit.ActiveUIDocument.Document.Create.NewFoundationSlab(
|
||||
slab.OctagonalProfile, m_foundationSlabType, m_levelList.Values[0],
|
||||
true, normal);
|
||||
t.Commit();
|
||||
if (null == foundationSlab)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Delete the regular slab.
|
||||
Transaction t2 = new Transaction(m_revit.ActiveUIDocument.Document, Guid.NewGuid().GetHashCode().ToString());
|
||||
t2.Start();
|
||||
Autodesk.Revit.DB.ElementId deleteSlabId = slab.Id;
|
||||
m_revit.ActiveUIDocument.Document.Delete(deleteSlabId);
|
||||
t2.Commit();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Find out all useful elements.
|
||||
/// </summary>
|
||||
private void FindElements()
|
||||
{
|
||||
IList<ElementFilter> filters = new List<ElementFilter>(4);
|
||||
filters.Add(new ElementClassFilter(typeof(Level)));
|
||||
filters.Add(new ElementClassFilter(typeof(View)));
|
||||
filters.Add(new ElementClassFilter(typeof(Floor)));
|
||||
filters.Add(new ElementClassFilter(typeof(FloorType)));
|
||||
|
||||
LogicalOrFilter orFilter = new LogicalOrFilter(filters);
|
||||
FilteredElementCollector collector = new FilteredElementCollector(m_revit.ActiveUIDocument.Document);
|
||||
FilteredElementIterator iterator = collector.WherePasses(orFilter).GetElementIterator();
|
||||
while (iterator.MoveNext())
|
||||
{
|
||||
// Find out all levels.
|
||||
Level level = (iterator.Current) as Level;
|
||||
if (null != level)
|
||||
{
|
||||
m_levelList.Add(level.Elevation, level);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Find out all views.
|
||||
View view = (iterator.Current) as View;
|
||||
if (null != view && !view.IsTemplate)
|
||||
{
|
||||
m_viewList.Add(view);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Find out all floors.
|
||||
Floor floor = (iterator.Current) as Floor;
|
||||
if (null != floor)
|
||||
{
|
||||
m_floorList.Add(floor);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Find out all foundation slab types.
|
||||
FloorType floorType = (iterator.Current) as FloorType;
|
||||
if (null == floorType)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if ("Structural Foundations" == floorType.Category.Name)
|
||||
{
|
||||
m_slabTypeList.Add(floorType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get all base slabs.
|
||||
/// </summary>
|
||||
/// <returns>A bool value suggests successful or not.</returns>
|
||||
private bool GetAllBaseSlabs()
|
||||
{
|
||||
// No level, no slabs.
|
||||
if (0 == m_levelList.Count)
|
||||
return false;
|
||||
|
||||
// Find out the lowest level's view for finding the bounding box of slab.
|
||||
View baseView = null;
|
||||
foreach (View view in m_viewList)
|
||||
{
|
||||
if (view.Name == m_levelList.Values[0].Name)
|
||||
{
|
||||
baseView = view;
|
||||
}
|
||||
}
|
||||
if (null == baseView)
|
||||
return false;
|
||||
|
||||
// Get all slabs at the base of the building.
|
||||
foreach (Floor floor in m_floorList)
|
||||
{
|
||||
if (floor.LevelId.IntegerValue == m_levelList.Values[0].Id.IntegerValue)
|
||||
{
|
||||
BoundingBoxXYZ bbXYZ = floor.get_BoundingBox(baseView); // Get the slab's bounding box.
|
||||
|
||||
// Check the floor. If the floor is planar, deal with it, otherwise, leap it.
|
||||
if (!IsPlanarFloor(bbXYZ, floor))
|
||||
continue;
|
||||
|
||||
CurveArray floorProfile = GetFloorProfile(floor); // Get the slab's profile.
|
||||
RegularSlab regularSlab = new RegularSlab(floor, floorProfile, bbXYZ); // Get a regular slab.
|
||||
m_allBaseSlabList.Add(regularSlab); // Add regular slab to the set.
|
||||
}
|
||||
}
|
||||
|
||||
// Getting regular slabs.
|
||||
if (0 != m_allBaseSlabList.Count)
|
||||
return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check whether the floor is planar.
|
||||
/// </summary>
|
||||
/// <param name="bbXYZ">The floor's bounding box.</param>
|
||||
/// <param name="floor">The floor object.</param>
|
||||
/// <returns>A bool value suggests the floor is planar or not.</returns>
|
||||
private static bool IsPlanarFloor(BoundingBoxXYZ bbXYZ, Floor floor)
|
||||
{
|
||||
// Get floor thickness.
|
||||
double floorThickness = 0.0;
|
||||
ElementType floorType = m_revit.ActiveUIDocument.Document.GetElement(floor.GetTypeId()) as ElementType;
|
||||
Parameter attribute = floorType.get_Parameter(BuiltInParameter.FLOOR_ATTR_DEFAULT_THICKNESS_PARAM);
|
||||
if (null != attribute)
|
||||
{
|
||||
floorThickness = attribute.AsDouble();
|
||||
}
|
||||
|
||||
// Get bounding box thickness.
|
||||
double boundThickness = Math.Abs(bbXYZ.Max.Z - bbXYZ.Min.Z);
|
||||
|
||||
// Planar or not.
|
||||
if (Math.Abs(boundThickness - floorThickness) < PlanarPrecision)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a floor's profile.
|
||||
/// </summary>
|
||||
/// <param name="floor">The floor whose profile you want to get.</param>
|
||||
/// <returns>The profile of the floor.</returns>
|
||||
private CurveArray GetFloorProfile(Floor floor)
|
||||
{
|
||||
CurveArray floorProfile = new CurveArray();
|
||||
// Structural slab's profile can be found in it's AnalyticalModel.
|
||||
if (null != floor.GetAnalyticalModel())
|
||||
{
|
||||
AnalyticalModel analyticalModel = floor.GetAnalyticalModel();
|
||||
IList<Curve> curveList = analyticalModel.GetCurves(AnalyticalCurveType.ActiveCurves);
|
||||
for (int i = 0; i < curveList.Count; i++)
|
||||
{
|
||||
floorProfile.Append(curveList[i]);
|
||||
}
|
||||
|
||||
return floorProfile;
|
||||
}
|
||||
|
||||
// Nonstructural floor's profile can be formed through it's Geometry.
|
||||
Options aOptions = m_revit.Application.Create.NewGeometryOptions();
|
||||
Autodesk.Revit.DB.GeometryElement aElementOfGeometry = floor.get_Geometry(aOptions);
|
||||
//GeometryObjectArray geometryObjects = aElementOfGeometry.Objects;
|
||||
IEnumerator<GeometryObject> Objects = aElementOfGeometry.GetEnumerator();
|
||||
//foreach (GeometryObject o in geometryObjects)
|
||||
while (Objects.MoveNext())
|
||||
{
|
||||
GeometryObject o = Objects.Current;
|
||||
|
||||
Solid solid = o as Solid;
|
||||
if (null == solid)
|
||||
continue;
|
||||
|
||||
// Form the floor's profile through solid's edges.
|
||||
EdgeArray edges = solid.Edges;
|
||||
for (int i = 0; i < (edges.Size) / 3; i++)
|
||||
{
|
||||
Edge edge = edges.get_Item(i);
|
||||
List<XYZ> xyzArray = edge.Tessellate() as List<XYZ>; // A set of points.
|
||||
for (int j = 0; j < (xyzArray.Count - 1); j++)
|
||||
{
|
||||
Autodesk.Revit.DB.XYZ startPoint = xyzArray[j];
|
||||
Autodesk.Revit.DB.XYZ endPoint = xyzArray[j + 1];
|
||||
Line line = Line.CreateBound(startPoint, endPoint);
|
||||
|
||||
floorProfile.Append(line);
|
||||
}
|
||||
}
|
||||
}
|
||||
return floorProfile;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user