mirror of
https://github.com/jeremytammik/RevitSdkSamples.git
synced 2026-09-18 02:21:33 +00:00
added Revit 2022 SDK minus except *rvt and *rfa
This commit is contained in:
@@ -0,0 +1,118 @@
|
||||
//
|
||||
// (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 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.Windows.Forms;
|
||||
|
||||
using Revit.SDK.Samples.NewRoof.RoofForms.CS;
|
||||
|
||||
using Autodesk.Revit;
|
||||
using Autodesk.Revit.DB;
|
||||
using Autodesk.Revit.UI;
|
||||
|
||||
namespace Revit.SDK.Samples.NewRoof.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
|
||||
{
|
||||
// internal buffer
|
||||
private static Autodesk.Revit.DB.View m_activeView;
|
||||
|
||||
/// <summary>
|
||||
/// singleton in the external application
|
||||
/// </summary>
|
||||
public static Autodesk.Revit.DB.View ActiveView
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_activeView;
|
||||
}
|
||||
}
|
||||
|
||||
/// <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(Autodesk.Revit.UI.ExternalCommandData commandData,
|
||||
ref string message,
|
||||
ElementSet elements)
|
||||
{
|
||||
try
|
||||
{
|
||||
m_activeView = commandData.Application.ActiveUIDocument.Document.ActiveView;
|
||||
|
||||
//// Create a new instance of class DataManager
|
||||
RoofsManager.CS.RoofsManager roofsManager = new RoofsManager.CS.RoofsManager(commandData);
|
||||
LevelConverter.SetStandardValues(roofsManager.Levels);
|
||||
|
||||
// Create a form to create and edit a roof.
|
||||
DialogResult result = System.Windows.Forms.DialogResult.None;
|
||||
while (result == DialogResult.None || result == DialogResult.Retry)
|
||||
{
|
||||
if (result == DialogResult.Retry)
|
||||
{
|
||||
roofsManager.WindowSelect();
|
||||
}
|
||||
|
||||
using (RoofForms.CS.RoofForm mainForm = new RoofForms.CS.RoofForm(roofsManager))
|
||||
{
|
||||
result = mainForm.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
if (result == System.Windows.Forms.DialogResult.OK)
|
||||
{
|
||||
return Autodesk.Revit.UI.Result.Succeeded;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Autodesk.Revit.UI.Result.Cancelled;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// If there are something wrong, give error information and return failed
|
||||
message = ex.Message;
|
||||
return Autodesk.Revit.UI.Result.Failed;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<RevitAddIns>
|
||||
<AddIn Type="Command">
|
||||
<Assembly>NewRoof.dll</Assembly>
|
||||
<ClientId>f6c0eb19-34e0-4d0f-9e6f-fd57658924a9</ClientId>
|
||||
<FullClassName>Revit.SDK.Samples.NewRoof.CS.Command</FullClassName>
|
||||
<Text>NewRoof</Text>
|
||||
<Description>Create or edit footprint roof and extrusion roof.</Description>
|
||||
<VisibilityMode>AlwaysVisible</VisibilityMode>
|
||||
<VendorId>ADSK</VendorId>
|
||||
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
|
||||
</AddIn>
|
||||
</RevitAddIns>
|
||||
@@ -0,0 +1,124 @@
|
||||
<?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>{1BB53C76-C784-4490-9CB2-CF9AEC00C3A3}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>NewRoof</RootNamespace>
|
||||
<AssemblyName>NewRoof</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</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>
|
||||
</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>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</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="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="RoofForms\CustomTypeConverter.cs" />
|
||||
<Compile Include="RoofForms\ExtrusionRoofWrapper.cs" />
|
||||
<Compile Include="RoofForms\FootPrintRoofWrapper.cs" />
|
||||
<Compile Include="RoofForms\RoofEditorForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="RoofForms\RoofEditorForm.Designer.cs">
|
||||
<DependentUpon>RoofEditorForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="RoofForms\RoofForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="RoofForms\RoofForm.Designer.cs">
|
||||
<DependentUpon>RoofForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="RoofForms\RoofItem.cs" />
|
||||
<Compile Include="RoofForms\GraphicsControl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="RoofForms\GraphicsControl.Designer.cs">
|
||||
<DependentUpon>GraphicsControl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="RoofsManager\ExtrusionRoofManager.cs" />
|
||||
<Compile Include="RoofsManager\FootPrintRoofManager.cs" />
|
||||
<Compile Include="RoofsManager\RoofsManager.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="RoofForms\RoofEditorForm.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>RoofEditorForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="RoofForms\RoofForm.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>RoofForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="RoofForms\GraphicsControl.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>GraphicsControl.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,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 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("NewRoof")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("NewRoof")]
|
||||
[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("9ebcf0be-8c3a-44bc-a56d-f05801051f7c")]
|
||||
|
||||
// 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,78 @@
|
||||
{\rtf1\fbidis\ansi\ansicpg1252\deff0\deflang1033\deflangfe2052\deftab420{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fmodern\fprq1\fcharset0 Courier New;}}
|
||||
{\colortbl ;\red0\green0\blue255;}
|
||||
{\info{\horzdoc}{\*\lchars (?[\'7b}{\*\fchars !),.:\'3b?D]\'7d}}
|
||||
\viewkind4\uc1\pard\ltrpar\nowidctlpar\b\f0\fs20 Application:\b0 NewRoof\line\b Revit Platform:\b0 All\line\b Revit Version:\b0 2011.0\line\b First Released For:\b0 2009.0\line\b Programming Language:\b0 C#\line\b Skill Level:\b0 High\line\b Category:\b0 Elements\line\b Type:\b0 ExternalCommand\line\line\b Subject:\b0 Create footprint and extrusion roof.\line\b Summary:\b0 \line This sample demonstrates four main features:\par
|
||||
\pard\ltrpar\nowidctlpar\fi-360\li1440\tx1440 1.\tab How to create a new footprint roof.\par
|
||||
\pard\ltrpar\nowidctlpar\fi-360\li1440 2.\tab How to create an extrusion roof.\par
|
||||
3.\tab How to edit an existed footprint roof.\par
|
||||
4.\tab How to edit an existed extrusion roof.\par
|
||||
\pard\ltrpar\nowidctlpar\par
|
||||
\b Classes:\b0 \par
|
||||
\pard\ltrpar\nowidctlpar\fi360 Autodesk.Revit.UI.IExternalCommand\f1\par
|
||||
\f0 Autodesk.Revit.DB.FootPrintRoof\par
|
||||
Autodesk.Revit.DB.ExtrusionRoof\par
|
||||
Autodesk.Revit.DB.Level\par
|
||||
Autodesk.Revit.DB.RoofType\par
|
||||
Autodesk.Revit.DB.Wall\par
|
||||
Autodesk.Revit.DB.Curve\par
|
||||
Autodesk.Revit.Creation.Document\par
|
||||
\f1\par
|
||||
\pard\ltrpar\nowidctlpar\f0\par
|
||||
\b Project Files:\b0 \par
|
||||
Command.cs\par
|
||||
\pard\ltrpar\nowidctlpar\li360\tx720 This file contains the class \ldblquote Command\rdblquote which inherits from \ldblquote IExternalCommand\rdblquote interface and implements the \ldblquote Execute\rdblquote method.\par
|
||||
\pard\ltrpar\nowidctlpar\fi240\par
|
||||
\pard\ltrpar\nowidctlpar RoofsManager.cs\f1\par
|
||||
\pard\ltrpar\nowidctlpar\li360\tx720\f0 It contains a class named \ldblquote RoofsManager\rdblquote which is used to manage the operation between Revit and the Add-In UI. It have the functionalities to create footprint roof, create extrusion roof, select footprint to create footprint roof and select profile to create extrusion roof in Revit.\par
|
||||
\par
|
||||
\pard\ltrpar\nowidctlpar FootPrintRoofManager.cs\f1\par
|
||||
\pard\ltrpar\nowidctlpar\li360\tx720\f0 It contains a class named \ldblquote FootPrintRoofManager\rdblquote which is used to manage the creation of footprint roof.\par
|
||||
\f1\par
|
||||
\pard\ltrpar\nowidctlpar\f0 ExtrusionRoofManager.cs\f1\par
|
||||
\pard\ltrpar\nowidctlpar\li360\tx720\f0 It contains a class named \ldblquote ExtrusionRoofManager\rdblquote which is used to manage creation of extrusion roof.\par
|
||||
\par
|
||||
\pard\ltrpar\nowidctlpar RoofForm.cs\f1\par
|
||||
\pard\ltrpar\nowidctlpar\li360\tx720\f0 It contains a class named \ldblquote RoofForm\rdblquote which is the main UI of the Add-In application. \par
|
||||
\f1\par
|
||||
\pard\ltrpar\nowidctlpar\f0 RoofEditorForm.cs\f1\par
|
||||
\pard\ltrpar\nowidctlpar\li360\tx720\f0 It contains a class named \ldblquote RoofEditorForm\rdblquote which is the edit UI to edit a selected roof in the RoofForm. It contains a PropertyGrid to allow user modify the properties or parameters of the selected roof.\par
|
||||
\par
|
||||
\pard\ltrpar\nowidctlpar GraphicsControl.cs\f1\par
|
||||
\pard\ltrpar\nowidctlpar\li360\tx720\f0 It contains a class named \ldblquote GraphicsControl\rdblquote which is used to display the footprint roof lines in a picture box control when the user is editing a footprint roof. The modifying footprint roof line will be highlighted in the control.\par
|
||||
\f1\par
|
||||
\pard\ltrpar\nowidctlpar\f0 CustomTypeConverter.cs\f1\par
|
||||
\pard\ltrpar\nowidctlpar\li360\tx720\f0 It contains a LevelConverter class and a FootPrintRoofLineConverter class. They are used to custom the display of the some properties in the PropertyGrid control.\par
|
||||
\par
|
||||
\pard\ltrpar\nowidctlpar FootPrintRoofWrapper.cs\f1\par
|
||||
\pard\ltrpar\nowidctlpar\li360\tx720\f0 It contains a FootPrintRoofWrapper class and a FootPrintRoofLine class. The FootPrintRoofWrapper class is used to wrapper a footprint roof to edit the roof in a PropertyGrid control. The FootPrintRoofLine is used to edit the footprint roof line in a PropertyGrid and the line can be drawn in GDI.\par
|
||||
\f1\par
|
||||
\pard\ltrpar\nowidctlpar\f0 ExtrusionRoofWrapper.cs\f1\par
|
||||
\pard\ltrpar\nowidctlpar\li360\tx720\f0 It contains a class named \ldblquote ExtrusionRoofWrapper\rdblquote which is used to wrapper an extrusion roof to edit the roof in a PropertyGrid control.\f1\par
|
||||
\par
|
||||
\pard\ltrpar\nowidctlpar\b\f0 Description:\b0 \par
|
||||
Functionalities:\par
|
||||
\pard\ltrpar\nowidctlpar\fi-360\li360\tx360 -\tab Get all footprint roofs and extrusion roofs in active document and list them grouped by the creation way.\f1\par
|
||||
\pard\ltrpar\nowidctlpar\fi-360\li360\f0 -\tab Create a footprint roof with default properties by specifying a curve loop, or a wall loop, or loops combination of walls and curves, a level and a roof type.\f1\par
|
||||
\f0 -\tab Create an extruded roof by providing a profile which is a series of connected lines or arcs, not closed in a loop, a roof type, a reference plane, an extrusion start value and an extrusion end value\f1 .\f0 Note that the reference plane should be a vertical plane.\par
|
||||
-\tab Select a footprint roof in the list, then user can define a footprint roof line is slope-defining and can change the slope angel of the selected roof, Also other properties of roof line can be changed respectively, such as overhang, offset from base, extend into wall. The roof\rquote s type can be changed just select a different type\f1 .\par
|
||||
\f0 -\tab Select an extrusion roof in the list, and then user can change the value of extrusion start, extrusion end, and the roof type and the reference level of the extrusion roof.\f1\par
|
||||
\pard\ltrpar\nowidctlpar\par
|
||||
\f0 Implementations:\f1\par
|
||||
\pard\ltrpar\nowidctlpar\fi-360\li360\tx360\f0 -\tab Using Element Filter to get all kinds roofs.\par
|
||||
\pard\ltrpar\nowidctlpar\fi-360\li360 -\tab Create footprint roof by the FootPrintRoof NewFootPrintRoof(CurveArray footPrint, Level level, RoofType roofType, ElementIdSet footPrintToModelCurvesMapping) method.\f2 \f0 The footprint can be specified by WindowsSelect() method of Selection class. The roof types can be obtained by the Autodesk.Revit.DB.Document.RoofTypes property.\f1\par
|
||||
\f0 -\tab Create extrusion roof by the ExtrusionRoof NewExtrusionRoof(CurveArray profile, ReferencePlane refPlane, Level level, RoofType roofType, double extrusionStart, double extrusionEnd) method\f1 .\f0 The profile can be specified by WindowsSelect method and the reference plane should be vertical and can be obtained by using Element filtering functionality\f1\par
|
||||
\f0 -\tab Edit the footprint roof or extrusion roof by accessing the properties or parameters of the selected roof\f1 .\par
|
||||
\pard\ltrpar\nowidctlpar\li360\f0\par
|
||||
\pard\ltrpar\nowidctlpar\b Instructions:\cf1\b0 \cf0\par
|
||||
\pard\ltrpar\nowidctlpar\fi-360\li360\tx360 1.\tab Open a Revit Architecture 2009 file. A sample project file NewRoof.rvt is available in the sample\rquote s folder.\par
|
||||
\pard\ltrpar\nowidctlpar\fi-360\li360 2.\tab Draw a curve loop or a wall loop or loops combination of walls and curves to create a footprint roof in Revit. \par
|
||||
3.\tab Run this command.\par
|
||||
4.\tab A dialog will be shown to display all the existed roofs. The footprint roofs will be listed in the footprint roof tab page and the extrusion roofs will be listed in the extrusion tab page.\par
|
||||
5.\tab In the footprint roof tab page, click \ldblquote Select footprint in Revit\rdblquote button to select the footprint you just created. Select a base level and roof type then click the \ldblquote Create\rdblquote button; a footprint roof will be created in Revit and will be listed in the footprint roof tab page. Click \ldblquote OK\rdblquote button to accept the creation or click the \ldblquote Cancel\rdblquote button to abort.\par
|
||||
6.\tab Draw a series of connected lines or arcs, not closed in a loop to create a profile in Revit. Draw a reference plane in Revit for extrude the profile to create an extrusion roof. Make sure the reference plan is vertical or the extrusion roof will be not creating successfully. If there are many reference planes in Revit, you\rquote d better create a good name for each plane to distinguish them.\par
|
||||
7.\tab In the extrusion roof tab page, click \ldblquote Select profile in Revit\rdblquote button to select the profile you just created. Select a reference plane, reference level, roof type and specify the extrusion start and extrusion end value, and then click the \ldblquote Create\rdblquote button; an extrusion roof will be created in Revit and will be listed in the extrusion roof tab page. For more information of extrusion start and extrusion end, you\rquote d better refer the extrusion roof part of the help document supplied by Revit. Click \ldblquote OK\rdblquote button to accept the creation or click the \ldblquote Cancel\rdblquote button to abort.\par
|
||||
8.\tab Edit a footprint roof. You can select a footprint roof and click the \ldblquote Edit\rdblquote button or you just double click the roof in the in the footprint roof tab page; a roof editor form will be displayed. The properties of the roof you can edit in the PropertyGird. The footprint roof lines will be displayed also; the current selected roof line in PropertyGird will be highlighted in red color. You can modify the roof type in the roof type combo box. After the finish the modification you can click the \ldblquote OK\rdblquote button to accept the change or click the \ldblquote Cancel\rdblquote button to abort.\par
|
||||
9.\tab Edit an extrusion roof. You can select an extrusion roof and click the \ldblquote Edit\rdblquote button or you just double click the roof in the in the extrusion roof tab page; a roof editor form will be displayed. You can edit the parameters of the extrusion roof in the PropertyGird. After the finish the modification you can click the \ldblquote OK\rdblquote button to accept the change or click the \ldblquote Cancel\rdblquote button to abort.\par
|
||||
\pard\ltrpar\nowidctlpar\f1\fs24\par
|
||||
}
|
||||
| ||||