added Revit 2022 SDK minus except *rvt and *rfa

This commit is contained in:
Jeremy Tammik
2021-04-20 11:36:21 +02:00
parent 1133a82dc5
commit 7e327986e8
3034 changed files with 1245318 additions and 0 deletions
+482
View File
@@ -0,0 +1,482 @@
//
// (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 Autodesk;
using Autodesk.Revit;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Autodesk.Revit.DB.Structure;
namespace Revit.SDK.Samples.CreateViewSection.CS
{
/// <summary>
/// The main class which given a linear element, such as a wall, floor or beam,
/// generates a section view across the mid point of the element.
/// </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
{
// Private Members
Autodesk.Revit.UI.UIDocument m_project; // Store the current document in revit
String m_errorInformation; // Store the error information
const Double PRECISION = 0.0000000001; // Define a precision of double data
BoundingBoxXYZ m_box; // Store the BoundingBoxXYZ reference used in creation
Autodesk.Revit.DB.Element m_currentComponent; // Store the selected element
SelectType m_type; // Indicate the type of the selected element.
// 0 - wall, 1 - beam, 2 - floor, -1 - invalid
const Double LENGTH = 10; // Define half length and width of BoudingBoxXYZ
const Double HEIGHT = 5; // Define height of the BoudingBoxXYZ
// Define a enum to indicate the selected element type
enum SelectType
{
WALL = 0,
BEAM = 1,
FLOOR = 2,
INVALID = -1
}
// Methods
/// <summary>
/// Default constructor of Command
/// </summary>
public Command()
{
m_type = SelectType.INVALID;
}
/// <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
{
m_project = commandData.Application.ActiveUIDocument;
// Get the selected element and store it to data member.
if (!GetSelectedElement())
{
message = m_errorInformation;
return Autodesk.Revit.UI.Result.Failed;
}
// Create a BoundingBoxXYZ instance which used in NewViewSection() method
if (!GenerateBoundingBoxXYZ())
{
message = m_errorInformation;
return Autodesk.Revit.UI.Result.Failed;
}
// Create a section view.
Transaction transaction = new Transaction(m_project.Document, "CreateSectionView");
transaction.Start();
//ViewSection section = m_project.Document.Create.NewViewSection(m_box);
ElementId DetailViewId = new ElementId(-1);
IList<Element> elems = new FilteredElementCollector(m_project.Document).OfClass(typeof(ViewFamilyType)).ToElements();
foreach (Element e in elems)
{
ViewFamilyType v = e as ViewFamilyType;
if (v != null && v.ViewFamily == ViewFamily.Detail)
{
DetailViewId = e.Id;
break;
}
}
ViewSection section = ViewSection.CreateDetail(m_project.Document, DetailViewId, m_box);
if (null == section)
{
message = "Can't create the ViewSection.";
return Autodesk.Revit.UI.Result.Failed;
}
// Modify some parameters to make it look better.
section.get_Parameter(BuiltInParameter.VIEW_DETAIL_LEVEL).Set(2);
transaction.Commit();
// If everything goes right, give successful information and return succeeded.
TaskDialog.Show("Revit", "Create view section succeeded.");
return Autodesk.Revit.UI.Result.Succeeded;
}
catch (Exception e)
{
message = e.Message;
return Autodesk.Revit.UI.Result.Failed;
}
}
/// <summary>
/// Get the selected element, and check whether it is a wall, a floor or a beam.
/// </summary>
/// <returns>true if the process succeed; otherwise, false.</returns>
Boolean GetSelectedElement()
{
// First get the selection, and make sure only one element in it.
ElementSet collection = new ElementSet();
foreach (ElementId elementId in m_project.Selection.GetElementIds())
{
collection.Insert(m_project.Document.GetElement(elementId));
}
if (1 != collection.Size)
{
m_errorInformation =
"Please select only one element, such as a wall, a beam or a floor.";
return false;
}
// Get the selected element.
foreach (Autodesk.Revit.DB.Element e in collection)
{
m_currentComponent = e;
}
// Make sure the element to be a wall, beam or a floor.
if (m_currentComponent is Wall)
{
// Check whether the wall is a linear wall
LocationCurve location = m_currentComponent.Location as LocationCurve;
if (null == location)
{
m_errorInformation = "The selected wall should be linear.";
return false;
}
if (location.Curve is Line)
{
m_type = SelectType.WALL; // when the element is a linear wall
return true;
}
else
{
m_errorInformation = "The selected wall should be linear.";
return false;
}
}
FamilyInstance beam = m_currentComponent as FamilyInstance;
if (null != beam && StructuralType.Beam == beam.StructuralType)
{
m_type = SelectType.BEAM; // when the element is a beam
return true;
}
if (m_currentComponent is Floor)
{
m_type = SelectType.FLOOR; // when the element is a floor.
return true;
}
// If it is not a wall, a beam or a floor, give error information.
m_errorInformation = "Please select an element, such as a wall, a beam or a floor.";
return false;
}
/// <summary>
/// Generate a BoundingBoxXYZ instance which used in NewViewSection() method
/// </summary>
/// <returns>true if the instance can be created; otherwise, false.</returns>
Boolean GenerateBoundingBoxXYZ()
{
Transaction transaction = new Transaction(m_project.Document, "GenerateBoundingBox");
transaction.Start();
// First new a BoundingBoxXYZ, and set the MAX and Min property.
m_box = new BoundingBoxXYZ();
m_box.Enabled = true;
Autodesk.Revit.DB.XYZ maxPoint = new Autodesk.Revit.DB.XYZ(LENGTH, LENGTH, 0);
Autodesk.Revit.DB.XYZ minPoint = new Autodesk.Revit.DB.XYZ(-LENGTH, -LENGTH, -HEIGHT);
m_box.Max = maxPoint;
m_box.Min = minPoint;
// Set Transform property is the most important thing.
// It define the Orgin and the directions(include RightDirection,
// UpDirection and ViewDirection) of the created view.
Transform transform = GenerateTransform();
if (null == transform)
{
return false;
}
m_box.Transform = transform;
transaction.Commit();
// If all went well, return true.
return true;
}
/// <summary>
/// Generate a Transform instance which as Transform property of BoundingBoxXYZ
/// </summary>
/// <returns>the reference of Transform, return null if it can't be generated</returns>
Transform GenerateTransform()
{
// Because different element have different ways to create Transform.
// So, this method just call corresponding method.
if (SelectType.WALL == m_type)
{
return GenerateWallTransform();
}
else if (SelectType.BEAM == m_type)
{
return GenerateBeamTransform();
}
else if (SelectType.FLOOR == m_type)
{
return GenerateFloorTransform();
}
else
{
m_errorInformation = "The program should never go here.";
return null;
}
}
/// <summary>
/// Generate a Transform instance which as Transform property of BoundingBoxXYZ,
/// when the user select a wall, this method will be called
/// </summary>
/// <returns>the reference of Transform, return null if it can't be generated</returns>
Transform GenerateWallTransform()
{
Transform transform = null;
Wall wall = m_currentComponent as Wall;
// Because the architecture wall and curtain wall don't have analytical Model lines.
// So Use Location property of wall object is better choice.
// First get the location line of the wall
LocationCurve location = wall.Location as LocationCurve;
Line locationLine = location.Curve as Line;
transform = Transform.Identity;
// Second find the middle point of the wall and set it as Origin property.
XYZ mPoint = XYZMath.FindMidPoint(locationLine.GetEndPoint(0), locationLine.GetEndPoint(1));
// midPoint is mid point of the wall location, but not the wall's.
// The different is the elevation of the point. Then change it.
Autodesk.Revit.DB.XYZ midPoint = new XYZ(mPoint.X, mPoint.Y, mPoint.Z + GetWallMidOffsetFromLocation(wall));
transform.Origin = midPoint;
// At last find out the directions of the created view, and set it as Basis property.
Autodesk.Revit.DB.XYZ basisZ = XYZMath.FindDirection(locationLine.GetEndPoint(0), locationLine.GetEndPoint(1));
Autodesk.Revit.DB.XYZ basisX = XYZMath.FindRightDirection(basisZ);
Autodesk.Revit.DB.XYZ basisY = XYZMath.FindUpDirection(basisZ);
transform.set_Basis(0, basisX);
transform.set_Basis(1, basisY);
transform.set_Basis(2, basisZ);
return transform;
}
/// <summary>
/// Generate a Transform instance which as Transform property of BoundingBoxXYZ,
/// when the user select a beam, this method will be called
/// </summary>
/// <returns>the reference of Transform, return null if it can't be generated</returns>
Transform GenerateBeamTransform()
{
Transform transform = null;
FamilyInstance instance = m_currentComponent as FamilyInstance;
// First check whether the beam is horizontal.
// In order to predigest the calculation, only allow it to be horizontal
double startOffset = instance.get_Parameter(BuiltInParameter.STRUCTURAL_BEAM_END0_ELEVATION).AsDouble();
double endOffset = instance.get_Parameter(BuiltInParameter.STRUCTURAL_BEAM_END1_ELEVATION).AsDouble();
if (-PRECISION > startOffset - endOffset || PRECISION < startOffset - endOffset)
{
m_errorInformation = "Please select a horizontal beam.";
return transform;
}
// Second get the Analytical Model line.
AnalyticalModel model = instance.GetAnalyticalModel();
if (null == model)
{
m_errorInformation = "The selected beam doesn't have Analytical Model line.";
return transform;
}
Curve curve = model.GetCurve();
if (null == curve)
{
m_errorInformation = "The program should never go here.";
return transform;
}
// Now I am sure I can create a transform instance.
transform = Transform.Identity;
// Third find the middle point of the line and set it as Origin property.
Autodesk.Revit.DB.XYZ startPoint = curve.GetEndPoint(0);
Autodesk.Revit.DB.XYZ endPoint = curve.GetEndPoint(1);
Autodesk.Revit.DB.XYZ midPoint = XYZMath.FindMidPoint(startPoint, endPoint);
transform.Origin = midPoint;
// At last find out the directions of the created view, and set it as Basis property.
Autodesk.Revit.DB.XYZ basisZ = XYZMath.FindDirection(startPoint, endPoint);
Autodesk.Revit.DB.XYZ basisX = XYZMath.FindRightDirection(basisZ);
Autodesk.Revit.DB.XYZ basisY = XYZMath.FindUpDirection(basisZ);
transform.set_Basis(0, basisX);
transform.set_Basis(1, basisY);
transform.set_Basis(2, basisZ);
return transform;
}
/// <summary>
/// Generate a Transform instance which as Transform property of BoundingBoxXYZ,
/// when the user select a floor, this method will be called
/// </summary>
/// <returns>the reference of Transform, return null if it can't be generated</returns>
Transform GenerateFloorTransform()
{
Transform transform = null;
Floor floor = m_currentComponent as Floor;
// First get the Analytical Model lines
AnalyticalModel model = floor.GetAnalyticalModel();
if (null == model)
{
m_errorInformation = "Please select a structural floor.";
return transform;
}
CurveArray curves = m_project.Document.Application.Create.NewCurveArray();
IList<Curve> curveList = model.GetCurves(AnalyticalCurveType.ActiveCurves);
foreach (Curve curve in curveList)
{
curves.Append(curve);
}
if (null == curves || true == curves.IsEmpty)
{
m_errorInformation = "The program should never go here.";
return transform;
}
// Now I am sure I can create a transform instance.
transform = Transform.Identity;
// Third find the middle point of the floor and set it as Origin property.
Autodesk.Revit.DB.XYZ midPoint = XYZMath.FindMiddlePoint(curves);
transform.Origin = midPoint;
// At last find out the directions of the created view, and set it as Basis property.
Autodesk.Revit.DB.XYZ basisZ = XYZMath.FindFloorViewDirection(curves);
Autodesk.Revit.DB.XYZ basisX = XYZMath.FindRightDirection(basisZ);
Autodesk.Revit.DB.XYZ basisY = XYZMath.FindUpDirection(basisZ);
transform.set_Basis(0, basisX);
transform.set_Basis(1, basisY);
transform.set_Basis(2, basisZ);
return transform;
}
Double GetWallMidOffsetFromLocation(Wall wall)
{
// First get the "Base Offset" property.
Double baseOffset = wall.get_Parameter(BuiltInParameter.WALL_BASE_OFFSET).AsDouble();
// Second get the "Unconnected Height" property.
Double height = wall.get_Parameter(BuiltInParameter.WALL_USER_HEIGHT_PARAM).AsDouble();
// Get the middle of of wall elevation from the wall location.
// The elevation of wall location equals the elevation of "Base Constraint" level
Double midOffset = baseOffset + height / 2;
return midOffset;
}
}
/// <summary>
/// Create a drafting view.
/// </summary>
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
[Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
public class CreateDraftingView : IExternalCommand
{
public Autodesk.Revit.UI.Result Execute(
ExternalCommandData commandData,
ref string message,
ElementSet elements)
{
try
{
Autodesk.Revit.DB.Document doc = commandData.Application.ActiveUIDocument.Document;
Transaction transaction = new Transaction(doc, "CreateDraftingView");
transaction.Start();
ViewFamilyType viewFamilyType = null;
FilteredElementCollector collector = new FilteredElementCollector(doc);
var viewFamilyTypes = collector.OfClass(typeof(ViewFamilyType)).ToElements();
foreach (Element e in viewFamilyTypes)
{
ViewFamilyType v = e as ViewFamilyType;
if (v.ViewFamily == ViewFamily.Drafting)
{
viewFamilyType = v;
break;
}
}
ViewDrafting drafting = ViewDrafting.Create(doc, viewFamilyType.Id);
if (null == drafting)
{
message = "Can't create the ViewDrafting.";
return Autodesk.Revit.UI.Result.Failed;
}
transaction.Commit();
TaskDialog.Show("Revit", "Create view drafting succeeded.");
return Autodesk.Revit.UI.Result.Succeeded;
}
catch (Exception e)
{
message = e.Message;
return Autodesk.Revit.UI.Result.Failed;
}
}
}
}
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<RevitAddIns>
<AddIn Type="Command">
<Assembly>CreateViewSection.dll</Assembly>
<ClientId>c5a6c410-17b1-4e92-b78d-306f6e24ed23</ClientId>
<FullClassName>Revit.SDK.Samples.CreateViewSection.CS.Command</FullClassName>
<Text>Create view section</Text>
<Description>Create a section view across the mid point of the selected wall, floor or beam</Description>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<VendorId>ADSK</VendorId>
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
</AddIn>
<AddIn Type="Command">
<Assembly>CreateViewSection.dll</Assembly>
<ClientId>29b8d8aa-48cc-4a36-aee6-96e704aaec38</ClientId>
<FullClassName>Revit.SDK.Samples.CreateViewSection.CS.CreateDraftingView</FullClassName>
<Text>Create drafting view</Text>
<Description>Create a new empty drafting view</Description>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<VendorId>ADSK</VendorId>
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
</AddIn>
</RevitAddIns>
@@ -0,0 +1,113 @@
<?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>{98A455C0-4131-468B-97A4-D0BE364BF9F8}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CreateViewSection</RootNamespace>
<AssemblyName>CreateViewSection</AssemblyName>
<SccProjectName>
</SccProjectName>
<SccLocalPath>
</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>
</SccProvider>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<BootstrapperEnabled>true</BootstrapperEnabled>
<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.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Command.cs" />
<Compile Include="XYZMath.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
<Visible>False</Visible>
<ProductName>.NET Framework 2.0</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</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("NewViewSection")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NewViewSection")]
[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("fa656ff6-7083-4a00-bef4-eb98873c675e")]
// 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,242 @@
{\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 \fswiss\fcharset128\fprq2{\*\panose 02010600030101010101}SimSun{\*\falt \'91\'76\'91\'cc};}{\f34\fbidi \froman\fcharset1\fprq2{\*\panose 02040503050406030204}Cambria Math;}
{\f39\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Verdana;}{\f40\fbidi \fswiss\fcharset128\fprq2{\*\panose 02010600030101010101}@SimSun;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
{\fdbmajor\f31501\fbidi \fswiss\fcharset128\fprq2{\*\panose 02010600030101010101}SimSun{\*\falt \'91\'76\'91\'cc};}{\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 \fswiss\fcharset128\fprq2{\*\panose 02010600030101010101}SimSun{\*\falt \'91\'76\'91\'cc};}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}
{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f41\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f42\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
{\f44\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f45\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f46\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f47\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
{\f48\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f49\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f51\fbidi \fswiss\fcharset238\fprq2 Arial CE;}{\f52\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;}
{\f54\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f55\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f56\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f57\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);}
{\f58\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f59\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f173\fbidi \fswiss\fcharset0\fprq2 SimSun Western{\*\falt \'91\'76\'91\'cc};}
{\f171\fbidi \fswiss\fcharset238\fprq2 SimSun CE{\*\falt \'91\'76\'91\'cc};}{\f172\fbidi \fswiss\fcharset204\fprq2 SimSun Cyr{\*\falt \'91\'76\'91\'cc};}{\f174\fbidi \fswiss\fcharset161\fprq2 SimSun Greek{\*\falt \'91\'76\'91\'cc};}
{\f175\fbidi \fswiss\fcharset162\fprq2 SimSun Tur{\*\falt \'91\'76\'91\'cc};}{\f177\fbidi \fswiss\fcharset178\fprq2 SimSun (Arabic){\*\falt \'91\'76\'91\'cc};}{\f178\fbidi \fswiss\fcharset186\fprq2 SimSun Baltic{\*\falt \'91\'76\'91\'cc};}
{\f179\fbidi \fswiss\fcharset163\fprq2 SimSun (Vietnamese){\*\falt \'91\'76\'91\'cc};}{\f431\fbidi \fswiss\fcharset238\fprq2 Verdana CE;}{\f432\fbidi \fswiss\fcharset204\fprq2 Verdana Cyr;}{\f434\fbidi \fswiss\fcharset161\fprq2 Verdana Greek;}
{\f435\fbidi \fswiss\fcharset162\fprq2 Verdana Tur;}{\f438\fbidi \fswiss\fcharset186\fprq2 Verdana Baltic;}{\f439\fbidi \fswiss\fcharset163\fprq2 Verdana (Vietnamese);}{\f443\fbidi \fswiss\fcharset0\fprq2 @SimSun Western;}
{\f441\fbidi \fswiss\fcharset238\fprq2 @SimSun CE;}{\f442\fbidi \fswiss\fcharset204\fprq2 @SimSun Cyr;}{\f444\fbidi \fswiss\fcharset161\fprq2 @SimSun Greek;}{\f445\fbidi \fswiss\fcharset162\fprq2 @SimSun Tur;}
{\f447\fbidi \fswiss\fcharset178\fprq2 @SimSun (Arabic);}{\f448\fbidi \fswiss\fcharset186\fprq2 @SimSun Baltic;}{\f449\fbidi \fswiss\fcharset163\fprq2 @SimSun (Vietnamese);}{\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 \fswiss\fcharset0\fprq2 SimSun Western{\*\falt \'91\'76\'91\'cc};}
{\fdbmajor\f31518\fbidi \fswiss\fcharset238\fprq2 SimSun CE{\*\falt \'91\'76\'91\'cc};}{\fdbmajor\f31519\fbidi \fswiss\fcharset204\fprq2 SimSun Cyr{\*\falt \'91\'76\'91\'cc};}
{\fdbmajor\f31521\fbidi \fswiss\fcharset161\fprq2 SimSun Greek{\*\falt \'91\'76\'91\'cc};}{\fdbmajor\f31522\fbidi \fswiss\fcharset162\fprq2 SimSun Tur{\*\falt \'91\'76\'91\'cc};}
{\fdbmajor\f31524\fbidi \fswiss\fcharset178\fprq2 SimSun (Arabic){\*\falt \'91\'76\'91\'cc};}{\fdbmajor\f31525\fbidi \fswiss\fcharset186\fprq2 SimSun Baltic{\*\falt \'91\'76\'91\'cc};}
{\fdbmajor\f31526\fbidi \fswiss\fcharset163\fprq2 SimSun (Vietnamese){\*\falt \'91\'76\'91\'cc};}{\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 \fswiss\fcharset0\fprq2 SimSun Western{\*\falt \'91\'76\'91\'cc};}
{\fdbminor\f31558\fbidi \fswiss\fcharset238\fprq2 SimSun CE{\*\falt \'91\'76\'91\'cc};}{\fdbminor\f31559\fbidi \fswiss\fcharset204\fprq2 SimSun Cyr{\*\falt \'91\'76\'91\'cc};}
{\fdbminor\f31561\fbidi \fswiss\fcharset161\fprq2 SimSun Greek{\*\falt \'91\'76\'91\'cc};}{\fdbminor\f31562\fbidi \fswiss\fcharset162\fprq2 SimSun Tur{\*\falt \'91\'76\'91\'cc};}
{\fdbminor\f31564\fbidi \fswiss\fcharset178\fprq2 SimSun (Arabic){\*\falt \'91\'76\'91\'cc};}{\fdbminor\f31565\fbidi \fswiss\fcharset186\fprq2 SimSun Baltic{\*\falt \'91\'76\'91\'cc};}
{\fdbminor\f31566\fbidi \fswiss\fcharset163\fprq2 SimSun (Vietnamese){\*\falt \'91\'76\'91\'cc};}{\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 \rsid10760583}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\operator Lule}
{\creatim\yr2010\mo3\dy3\hr17\min12}{\revtim\yr2010\mo3\dy3\hr17\min15}{\version2}{\edmins3}{\nofpages2}{\nofwords221}{\nofchars1691}{\nofcharsws1909}{\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\rsidroot10760583 \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\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Application:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 CreateViewSection\line }{\rtlch\fcs1 \ab\af1\afs20
\ltrch\fcs0 \b\f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Revit Platform:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Structure\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0
\b\f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Revit Version:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 2011.0\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid10760583
\hich\af1\dbch\af31505\loch\f1 First Released For:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 9.0\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1
Programming Language:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 C#\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Skill Level:}{\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Medium\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Category:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Views\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Type:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583
\hich\af1\dbch\af31505\loch\f1 ExternalCommand\line \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Subject:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583
\hich\af1\dbch\af31505\loch\f1 Create section views.\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Summary:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583
\hich\af1\dbch\af31505\loch\f1 \line \hich\af1\dbch\af31505\loch\f1 This sample shows how to generate a section view across the mid point of a linear element, such as a wall, floor or beam}{\rtlch\fcs1 \ai\af0\afs20 \ltrch\fcs0
\i\f0\fs20\insrsid10760583
\par }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid10760583
\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Classes:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1
\par }\pard \ltrpar\ql \fi180\li180\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin180\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583\charrsid10760583 \hich\af1\dbch\af31505\loch\f1
Autodesk.Revit.UI.IExternalCommand}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583\charrsid10760583 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.Document\hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583\charrsid10760583 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.BoundingBoxXYZ\hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Element
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583
\hich\af1\dbch\af31505\loch\f1 ElementSet
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583
\hich\af1\dbch\af31505\loch\f1 Wall
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583
\hich\af1\dbch\af31505\loch\f1 LocationCurve
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583
\hich\af1\dbch\af31505\loch\f1 Line
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583
\hich\af1\dbch\af31505\loch\f1 FamilyInstance
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583
\hich\af1\dbch\af31505\loch\f1 Transform
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583
\hich\af1\dbch\af31505\loch\f1 Structural.AnalyticalModel
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583
\hich\af1\dbch\af31505\loch\f1 Structural.An\hich\af1\dbch\af31505\loch\f1 alyticalModelFrame
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583
\hich\af1\dbch\af31505\loch\f1 Curve
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583
\hich\af1\dbch\af31505\loch\f1 Floor
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583
\hich\af1\dbch\af31505\loch\f1 Structural.AnalyticalModelFloor
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583
\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Project Files:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \ai\af1\afs20 \ltrch\fcs0
\i\f1\fs20\insrsid10760583
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Command.vb
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583 \hich\af1\dbch\af31505\loch\f1
It contains the class Command which implements interface IExternalCommand and the generating process o\hich\af1\dbch\af31505\loch\f1
f the section view across the mid point of a linear element. It also contains a class CreateDraftingView to create a drafting view.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\lang1036\langfe2052\langnp1036\insrsid10760583
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid10760583
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 XYZMath.cs}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid10760583
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 It gives operations about point and vector presented by XYZ structure.}{\rtlch\fcs1
\af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid10760583
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \ab\af0\afs20 \ltrch\fcs0 \b\f0\fs20\insrsid10760583
\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Description:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0
\f0\fs20\insrsid10760583
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 This sample provides following functionalities.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid10760583
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583 -\tab \hich\af1\dbch\af31505\loch\f1 Retrieve the selected linear element.}{\rtlch\fcs1 \af0\afs20
\ltrch\fcs0 \f0\fs20\insrsid10760583
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583 -\tab \hich\af1\dbch\af31505\loch\f1
Generate a BoundingBoxXYZ instance which will be used in NewViewSection() method}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid10760583
\par }\pard \ltrpar\ql \fi-420\li840\ri0\nowidctlpar\tx840\wrapdefault\faauto\rin0\lin840\itap0 {\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\insrsid10760583 -\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1
set its Max and Min property}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid10760583
\par }{\rtlch\fcs1 \af39\afs20 \ltrch\fcs0 \f39\fs20\insrsid10760583 -\tab }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Generate a Transform instance as the Transform prope\hich\af1\dbch\af31505\loch\f1
rty of BoundingBoxXYZ which defines the Origin and the directions (including RightDirection, UpDirection and ViewDirection) of the created view}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid10760583
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583 -\tab \hich\af1\dbch\af31505\loch\f1 Create the section view using the BoundingBoxXYZ.}{\rtlch\fcs1
\af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid10760583
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid10760583
\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Instructions:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\cf2\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0
\f0\fs20\cf2\insrsid10760583
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 1.\tab Open Revit Structure.
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 2.\tab \hich\af1\dbch\af31505\loch\f1
Draw a linear element (wall, structural floor or structural beam).
\par \hich\af1\dbch\af31505\loch\f1 3.\tab Select the element and execute the external command Command.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid10760583
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 Or
\par }\pard \ltrpar\ql \fi-420\li420\ri0\nowidctlpar\tx420\wrapdefault\faauto\rin0\lin420\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 1.\tab Open Revit Structure.
\par }\pard \ltrpar\ql \fi-420\li420\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin420\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 2.\tab Execute the external command }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\lang1036\langfe2052\langnp1036\insrsid10760583 \hich\af1\dbch\af31505\loch\f1 CreateDraftingView.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid10760583
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid10760583
\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
ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffffec69d9888b8b3d4c859eaf6cd158be0f00000000000000000000000090b9
060db2baca01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000105000000000000}}
+229
View File
@@ -0,0 +1,229 @@
//
// (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 Autodesk.Revit.DB;
namespace Revit.SDK.Samples.CreateViewSection.CS
{
/// <summary>
/// The helper class which give some operation about point and vector.
/// The point and vector are both presented by Autodesk.Revit.DB.XYZ structure.
/// </summary>
public class XYZMath
{
// Private Members
const Double PRECISION = 0.0000000001; // Define a precision of double data
// Methods
/// <summary>
/// Find the middle point of the line.
/// </summary>
/// <param name="first">the start point of the line</param>
/// <param name="second">the end point of the line</param>
/// <returns>the middle point of the line</returns>
public static Autodesk.Revit.DB.XYZ FindMidPoint(Autodesk.Revit.DB.XYZ first, Autodesk.Revit.DB.XYZ second)
{
double x = (first.X + second.X) / 2;
double y = (first.Y + second.Y) / 2;
double z = (first.Z + second.Z) / 2;
Autodesk.Revit.DB.XYZ midPoint = new Autodesk.Revit.DB.XYZ (x, y, z);
return midPoint;
}
/// <summary>
/// Find the distance between two points
/// </summary>
/// <param name="first">the first point</param>
/// <param name="second">the first point</param>
/// <returns>the distance of two points</returns>
public static double FindDistance(Autodesk.Revit.DB.XYZ first, Autodesk.Revit.DB.XYZ second)
{
double x = first.X - second.X;
double y = first.Y - second.Y;
double z = first.Z - second.Z;
return Math.Sqrt(x * x + y * y + z * z);
}
/// <summary>
/// Find the direction vector from first point to second point
/// </summary>
/// <param name="first">the first point</param>
/// <param name="second">the second point</param>
/// <returns>the direction vector</returns>
public static Autodesk.Revit.DB.XYZ FindDirection(Autodesk.Revit.DB.XYZ first, Autodesk.Revit.DB.XYZ second)
{
double x = second.X - first.X;
double y = second.Y - first.Y;
double z = second.Z - first.Z;
double distance = FindDistance(first, second);
Autodesk.Revit.DB.XYZ direction = new Autodesk.Revit.DB.XYZ (x / distance, y / distance, z / distance);
return direction;
}
/// <summary>
/// Find the right direction vector,
/// which is the same meaning of RightDirection property in View class
/// </summary>
/// <param name="viewDirection">the view direction vector</param>
/// <returns>the right direction vector</returns>
public static Autodesk.Revit.DB.XYZ FindRightDirection(Autodesk.Revit.DB.XYZ viewDirection)
{
// Because this example only allow the beam to be horizontal,
// the created viewSection should be vertical,
// the same thing can also be found when the user select wall or floor.
// So only need to turn 90 degree around Z axes will get Right Direction.
double x = -viewDirection.Y;
double y = viewDirection.X;
double z = viewDirection.Z;
Autodesk.Revit.DB.XYZ direction = new Autodesk.Revit.DB.XYZ (x, y, z);
return direction;
}
/// <summary>
/// Find the up direction vector,
/// which is the same meaning of UpDirection property in View class
/// </summary>
/// <param name="viewDirection">the view direction vector</param>
/// <returns>the up direction vector</returns>
public static Autodesk.Revit.DB.XYZ FindUpDirection(Autodesk.Revit.DB.XYZ viewDirection)
{
// Because this example only allow the beam to be horizontal,
// the created viewSection should be vertical,
// the same thing can also be found when the user select wall or floor.
// So UpDirection should be z axes.
Autodesk.Revit.DB.XYZ direction = new Autodesk.Revit.DB.XYZ (0, 0, 1);
return direction;
}
/// <summary>
/// Find the middle point of a profile.
/// This method is used to find out middle point of the selected wall or floor.
/// </summary>
/// <param name="curveArray">the array of curve which form the profile</param>
/// <returns>the middle point of the profile</returns>
public static Autodesk.Revit.DB.XYZ FindMiddlePoint(CurveArray curveArray)
{
// First form a point array which include all the end points of the curves
List<Autodesk.Revit.DB.XYZ> array = new List<Autodesk.Revit.DB.XYZ>();
foreach (Curve curve in curveArray)
{
Autodesk.Revit.DB.XYZ first = curve.GetEndPoint(0);
Autodesk.Revit.DB.XYZ second = curve.GetEndPoint(1);
array.Add(first);
array.Add(second);
}
// Second find the max and min value of three coordinate
double maxX = array[0].X; // the max x coordinate in the array
double minX = array[0].X; // the min x coordinate in the array
double maxY = array[0].Y; // the max y coordinate in the array
double minY = array[0].Y; // the min y coordinate in the array
double maxZ = array[0].Z; // the max z coordinate in the array
double minZ = array[0].Z; // the min z coordinate in the array
foreach (Autodesk.Revit.DB.XYZ curve in array)
{
if (maxX < curve.X)
{
maxX = curve.X;
}
if (minX > curve.X)
{
minX = curve.X;
}
if (maxY < curve.Y)
{
maxY = curve.Y;
}
if (minY > curve.Y)
{
minY = curve.Y;
}
if (maxZ < curve.Z)
{
maxZ = curve.Z;
}
if (minZ > curve.Z)
{
minZ = curve.Z;
}
}
// Third form the middle point using the average of max and min values
double x = (maxX + minX) / 2;
double y = (maxY + minY) / 2;
double z = (maxZ + minZ) / 2;
Autodesk.Revit.DB.XYZ midPoint = new Autodesk.Revit.DB.XYZ (x, y, z);
return midPoint;
}
/// <summary>
/// Find the view direction vector,
/// which is the same meaning of ViewDirection property in View class
/// </summary>
/// <param name="curveArray">the curve array which form wall's AnalyticalModel</param>
/// <returns>the view direction vector</returns>
public static Autodesk.Revit.DB.XYZ FindWallViewDirection(CurveArray curveArray)
{
Autodesk.Revit.DB.XYZ direction = new Autodesk.Revit.DB.XYZ ();
foreach (Curve curve in curveArray)
{
Autodesk.Revit.DB.XYZ startPoint = curve.GetEndPoint(0);
Autodesk.Revit.DB.XYZ endPoint = curve.GetEndPoint(1);
double distanceX = startPoint.X - endPoint.X;
double distanceY = startPoint.Y - endPoint.Y;
if(-PRECISION > distanceX || PRECISION < distanceX
|| -PRECISION > distanceY || PRECISION < distanceY)
{
Autodesk.Revit.DB.XYZ first = new Autodesk.Revit.DB.XYZ (startPoint.X, startPoint.Y, 0);
Autodesk.Revit.DB.XYZ second = new Autodesk.Revit.DB.XYZ (endPoint.X, endPoint.Y, 0);
direction = FindDirection(first, second);
break;
}
}
return direction;
}
/// <summary>
/// Find the view direction vector,
/// which is the same meaning of ViewDirection property in View class
/// </summary>
/// <param name="curveArray">the curve array which form floor's AnalyticalModel</param>
/// <returns>the view direction vector</returns>
public static Autodesk.Revit.DB.XYZ FindFloorViewDirection(CurveArray curveArray)
{
// Because the floor is always on the level,
// so each curve can give the direction information.
Curve curve = curveArray.get_Item(0);
Autodesk.Revit.DB.XYZ first = curve.GetEndPoint(0);
Autodesk.Revit.DB.XYZ second = curve.GetEndPoint(1);
return FindDirection(first, second);
}
}
}