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
@@ -0,0 +1,112 @@
namespace Revit.SDK.Samples.PlaceFamilyInstanceByFace.CS
{
partial class BasedTypeForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.buttonNext = new System.Windows.Forms.Button();
this.buttonCancel = new System.Windows.Forms.Button();
this.radioButtonPoint = new System.Windows.Forms.RadioButton();
this.radioButtonLine = new System.Windows.Forms.RadioButton();
this.SuspendLayout();
//
// buttonNext
//
this.buttonNext.Location = new System.Drawing.Point(25, 50);
this.buttonNext.Name = "buttonNext";
this.buttonNext.Size = new System.Drawing.Size(75, 23);
this.buttonNext.TabIndex = 1;
this.buttonNext.Text = "&Next";
this.buttonNext.UseVisualStyleBackColor = true;
this.buttonNext.Click += new System.EventHandler(this.buttonNext_Click);
//
// buttonCancel
//
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(111, 50);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
this.buttonCancel.TabIndex = 2;
this.buttonCancel.Text = "&Cancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
//
// radioButtonPoint
//
this.radioButtonPoint.AutoSize = true;
this.radioButtonPoint.Checked = true;
this.radioButtonPoint.Location = new System.Drawing.Point(13, 12);
this.radioButtonPoint.Name = "radioButtonPoint";
this.radioButtonPoint.Size = new System.Drawing.Size(82, 17);
this.radioButtonPoint.TabIndex = 0;
this.radioButtonPoint.TabStop = true;
this.radioButtonPoint.Text = "Point Based";
this.radioButtonPoint.UseVisualStyleBackColor = true;
//
// radioButtonLine
//
this.radioButtonLine.AutoSize = true;
this.radioButtonLine.Location = new System.Drawing.Point(119, 12);
this.radioButtonLine.Name = "radioButtonLine";
this.radioButtonLine.Size = new System.Drawing.Size(78, 17);
this.radioButtonLine.TabIndex = 1;
this.radioButtonLine.TabStop = true;
this.radioButtonLine.Text = "Line Based";
this.radioButtonLine.UseVisualStyleBackColor = true;
//
// BasedTypeForm
//
this.AcceptButton = this.buttonNext;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.buttonCancel;
this.ClientSize = new System.Drawing.Size(219, 85);
this.Controls.Add(this.radioButtonLine);
this.Controls.Add(this.buttonCancel);
this.Controls.Add(this.radioButtonPoint);
this.Controls.Add(this.buttonNext);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "BasedTypeForm";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Based Type";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button buttonNext;
private System.Windows.Forms.Button buttonCancel;
private System.Windows.Forms.RadioButton radioButtonPoint;
private System.Windows.Forms.RadioButton radioButtonLine;
}
}
@@ -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.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Revit.SDK.Samples.PlaceFamilyInstanceByFace.CS
{
/// <summary>
/// This form class is for user choose a based-type of creating family instance
/// </summary>
public partial class BasedTypeForm : System.Windows.Forms.Form
{
#region Fields
// based-type
private BasedType m_baseType = BasedType.Point;
#endregion
#region Property
/// <summary>
/// based-type
/// </summary>
public BasedType BaseType
{
get
{
return m_baseType;
}
}
#endregion
#region Constructor
/// <summary>
/// Constructor
/// </summary>
public BasedTypeForm()
{
InitializeComponent();
}
#endregion
#region Private methods
/// <summary>
/// Process the click event of "Next" button
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void buttonNext_Click(object sender, EventArgs e)
{
if (radioButtonPoint.Checked)
{
m_baseType = BasedType.Point;
}
else if (radioButtonLine.Checked)
{
m_baseType = BasedType.Line;
}
else
{
throw new Exception("An error occured in selecting based type.");
}
this.Close();
this.DialogResult = DialogResult.OK;
}
/// <summary>
/// Process the click event of "Cancel" button
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void buttonCancel_Click(object sender, EventArgs e)
{
this.Close();
this.DialogResult = DialogResult.Cancel;
}
#endregion
}
/// <summary>
/// Based-type
/// </summary>
public enum BasedType
{
/// <summary>
/// Point-based
/// </summary>
Point = 0,
/// <summary>
/// Line-based
/// </summary>
Line,
}
}
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
@@ -0,0 +1,93 @@
//
// (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.Revit;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
namespace Revit.SDK.Samples.PlaceFamilyInstanceByFace.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
{
/// <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)
{
// Quit if active document is null
if (null == commandData.Application.ActiveUIDocument.Document)
{
message = "Active document is null.";
return Autodesk.Revit.UI.Result.Failed;
}
try
{
FamilyInstanceCreator creator = new FamilyInstanceCreator(commandData.Application);
// an option dialog for user choosing based type of creating
BasedTypeForm baseTypeform = new BasedTypeForm();
if (DialogResult.OK == baseTypeform.ShowDialog())
{
PlaceFamilyInstanceForm placeForm = new PlaceFamilyInstanceForm(creator
, baseTypeform.BaseType);
placeForm.ShowDialog();
}
// if everything goes well, return succeeded.
return Autodesk.Revit.UI.Result.Succeeded;
}
catch (Exception ex)
{
// If any error, give error information and return failed
message = ex.Message;
return Autodesk.Revit.UI.Result.Failed;
}
}
}
}
@@ -0,0 +1,492 @@
//
// (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.Revit;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using GeoInstance = Autodesk.Revit.DB.GeometryInstance;
using GeoElement = Autodesk.Revit.DB.GeometryElement;
using RevitElement = Autodesk.Revit.DB.Element;
namespace Revit.SDK.Samples.PlaceFamilyInstanceByFace.CS
{
/// <summary>
/// This is main data class for creating family Instance by face
/// </summary>
public class FamilyInstanceCreator
{
#region Fields
// Revit document
private UIDocument m_revitDoc;
// Creation application
private Autodesk.Revit.Creation.Application m_appCreator;
// all face names
private List<String> m_faceNameList = new List<String>();
// all face instances
private List<Face> m_faceList = new List<Face>();
// all family symbols
private List<FamilySymbol> m_familySymbolList = new List<FamilySymbol>();
// all family symbol names
private List<String> m_familySymbolNameList = new List<String>();
// the index default family symbol in family list
private int m_defaultIndex = -1;
#endregion
#region Properties
/// <summary>
/// Store the all face names, they will be displayed in a combo box
/// </summary>
public List<String> FaceNameList
{
get
{
return m_faceNameList;
}
}
/// <summary>
/// Revit document
/// </summary>
public UIDocument RevitDoc
{
get
{
return m_revitDoc;
}
}
/// <summary>
/// Store all face instances for convenience to create a face-based family instance
/// </summary>
public List<Face> FaceList
{
get
{
return m_faceList;
}
}
/// <summary>
/// Store all family symbol in current Revit document
/// </summary>
public List<FamilySymbol> FamilySymbolList
{
get
{
return m_familySymbolList;
}
}
/// <summary>
/// Store all family symbol names
/// </summary>
public List<String> FamilySymbolNameList
{
get
{
return m_familySymbolNameList;
}
}
/// <summary>
/// The index of default family symbol, will set it as default value when initializing UI
/// For based point, its name is "Point-based"
/// For based line, its name is "Line-based"
/// The prepared rfa files provide them
/// </summary>
public int DefaultFamilySymbolIndex
{
get
{
return m_defaultIndex;
}
}
#endregion
#region Constructor
/// <summary>
/// Constructor, Store the Revit application
/// </summary>
/// <param name="app"></param>
public FamilyInstanceCreator(Autodesk.Revit.UI.UIApplication app)
{
m_revitDoc = app.ActiveUIDocument;
m_appCreator = app.Application.Create;
if (!CheckSelectedElementSet())
{
throw new Exception("Please select an element with face geometry.");
}
}
#endregion
#region Public methods
/// <summary>
/// 1. Find all family symbols in current Revit document and store them
/// 2. Find the index of default family symbol
/// Point("Point-based"); Line("Line-based")
/// </summary>
public void CheckFamilySymbol(BasedType type)
{
m_defaultIndex = -1;
m_familySymbolList.Clear();
Autodesk.Revit.DB.FilteredElementIterator familySymbolItor =
new FilteredElementCollector(m_revitDoc.Document).OfClass(typeof(FamilySymbol)).GetElementIterator();
String defaultSymbolName = String.Empty;
switch (type)
{
case BasedType.Point:
defaultSymbolName = "Point-based";
break;
case BasedType.Line:
defaultSymbolName = "Line-based";
break;
default:
break;
}
bool hasDefaultSymbol = false;
int ii = 0;
while (familySymbolItor.MoveNext())
{
FamilySymbol symbol = (FamilySymbol)familySymbolItor.Current;
if (null == symbol)
{
continue;
}
if (!hasDefaultSymbol && 0 == String.Compare(defaultSymbolName, symbol.Name))
{
hasDefaultSymbol = true;
m_defaultIndex = ii;
}
// family symbol
m_familySymbolList.Add(symbol);
// family symbol name
String familyCategoryname = String.Empty;
if (null != symbol.Family.FamilyCategory)
{
familyCategoryname = symbol.Family.FamilyCategory.Name + " : ";
}
m_familySymbolNameList.Add(String.Format("{0}{1} : {2}"
, familyCategoryname, symbol.Family.Name, symbol.Name));
ii++;
}
if (!hasDefaultSymbol)
{
FamilySymbol loadedfamilySymbol = null;
try
{
m_revitDoc.Document.LoadFamilySymbol(String.Format(@"{0}.rfa", defaultSymbolName)
, defaultSymbolName
, out loadedfamilySymbol);
}
catch (Exception)
{
TaskDialog.Show("Revit", "Can't load the prepared rfa.");
}
if (null == loadedfamilySymbol)
{
return;
}
m_familySymbolList.Add(loadedfamilySymbol);
String familyCategoryname = String.Empty;
if (null != loadedfamilySymbol.Family.FamilyCategory)
{
familyCategoryname = loadedfamilySymbol.Family.FamilyCategory.Name + ": ";
}
m_familySymbolNameList.Add(String.Format("{0}{1}: {2}"
, familyCategoryname, loadedfamilySymbol.Family.Name, loadedfamilySymbol.Name));
m_defaultIndex = m_familySymbolList.Count - 1;
}
return;
}
/// <summary>
/// Create a based-point family instance by face
/// </summary>
/// <param name="locationP">the location point</param>
/// <param name="directionP">the direction</param>
/// <param name="faceIndex">the index of the selected face</param>
/// <param name="familySymbolIndex">the index of the selected family symbol</param>
/// <returns></returns>
public bool CreatePointFamilyInstance(Autodesk.Revit.DB.XYZ locationP, Autodesk.Revit.DB.XYZ directionP, int faceIndex
, int familySymbolIndex)
{
Face face = m_faceList[faceIndex];
if (!m_familySymbolList[familySymbolIndex].IsActive)
m_familySymbolList[familySymbolIndex].Activate();
FamilyInstance instance = m_revitDoc.Document.Create.NewFamilyInstance(face
, locationP, directionP, m_familySymbolList[familySymbolIndex]);
List<ElementId> instanceId = new List<ElementId>();
instanceId.Add(instance.Id);
m_revitDoc.Selection.SetElementIds(instanceId);
return true;
}
/// <summary>
/// Create a based-line family instance by face
/// </summary>
/// <param name="startP">the start point</param>
/// <param name="endP">the end point</param>
/// <param name="faceIndex">the index of the selected face</param>
/// <param name="familySymbolIndex">the index of the selected family symbol</param>
/// <returns></returns>
public bool CreateLineFamilyInstance(Autodesk.Revit.DB.XYZ startP, Autodesk.Revit.DB.XYZ endP, int faceIndex
, int familySymbolIndex)
{
Face face = m_faceList[faceIndex];
Autodesk.Revit.DB.XYZ projectedStartP = Project(face.Triangulate().Vertices as List<XYZ>, startP);
Autodesk.Revit.DB.XYZ projectedEndP = Project(face.Triangulate().Vertices as List<XYZ>, endP);
if (projectedStartP.IsAlmostEqualTo(projectedEndP))
{
return false;
}
Line line = Line.CreateBound(projectedStartP, projectedEndP);
if (!m_familySymbolList[familySymbolIndex].IsActive)
m_familySymbolList[familySymbolIndex].Activate();
FamilyInstance instance = m_revitDoc.Document.Create.NewFamilyInstance(face, line
, m_familySymbolList[familySymbolIndex]);
List<ElementId> instanceId = new List<ElementId>();
instanceId.Add(instance.Id);
m_revitDoc.Selection.SetElementIds(instanceId);
return true;
}
/// <summary>
/// Judge whether the selected elementSet has face geometry
/// </summary>
/// <returns>true is having face geometry, false is having no face geometry</returns>
public bool CheckSelectedElementSet()
{
// judge whether an or more element is selected
ElementSet es = new ElementSet();
foreach (ElementId elementId in m_revitDoc.Selection.GetElementIds())
{
es.Insert(m_revitDoc.Document.GetElement(elementId));
}
if (1 != es.Size)
{
return false;
}
m_faceList.Clear();
m_faceNameList.Clear();
// judge whether the selected element has face geometry
foreach (Autodesk.Revit.DB.ElementId elemId in m_revitDoc.Selection.GetElementIds())
{
Autodesk.Revit.DB.Element elem = m_revitDoc.Document.GetElement(elemId);
CheckSelectedElement(elem);
break;
}
if (0 >= m_faceList.Count)
{
return false;
}
return true;
}
#endregion
#region Private Methods
/// <summary>
/// Get the bounding box of a face, the BoundingBoxXYZ will be set in UI as default value
/// </summary>
/// <param name="indexFace">the index of face</param>
/// <returns>the bounding box</returns>
public BoundingBoxXYZ GetFaceBoundingBox(int indexFace)
{
Mesh mesh = m_faceList[indexFace].Triangulate();
Autodesk.Revit.DB.XYZ maxP = new Autodesk.Revit.DB.XYZ(double.MinValue, double.MinValue, double.MinValue);
Autodesk.Revit.DB.XYZ minP = new Autodesk.Revit.DB.XYZ(double.MaxValue, double.MaxValue, double.MaxValue);
foreach (Autodesk.Revit.DB.XYZ tempXYZ in mesh.Vertices)
{
minP = new XYZ(
Math.Min(minP.X, tempXYZ.X),
Math.Min(minP.Y, tempXYZ.Y),
Math.Min(minP.Z, tempXYZ.Z));
maxP = new XYZ(
Math.Max(maxP.X, tempXYZ.X),
Math.Max(maxP.Y, tempXYZ.Y),
Math.Max(maxP.Z, tempXYZ.Z));
}
BoundingBoxXYZ retBounding = new BoundingBoxXYZ();
retBounding.Max = maxP;
retBounding.Min = minP;
return retBounding;
}
/// <summary>
/// Judge whether an element has face geometry
/// </summary>
/// <param name="elem">the element to be checked</param>
/// <returns>true is having face geometry, false is having no face geometry</returns>
private bool CheckSelectedElement(RevitElement elem)
{
if (null == elem)
{
return false;
}
Autodesk.Revit.DB.Options opts = new Autodesk.Revit.DB.Options();
opts.View = m_revitDoc.Document.ActiveView;
opts.ComputeReferences = true;
// Get geometry of the element
GeoElement geoElement = elem.get_Geometry(opts);
InquireGeometry(geoElement, elem);
return true;
}
/// <summary>
/// Inquire an geometry element to get all face instances
/// </summary>
/// <param name="geoElement">the geometry element</param>
/// <param name="elem">the element, it provides the prefix of face name</param>
/// <returns></returns>
private bool InquireGeometry(GeoElement geoElement, RevitElement elem)
{
if (null == geoElement || null == elem)
{
return false;
}
//GeometryObjectArray geoArray = null;
IEnumerator<GeometryObject> Objects = geoElement.GetEnumerator();
//if (null != geoElement && null != geoElement.Objects)
if (null != geoElement && Objects.MoveNext())
{
//geoArray = geoElement.Objects;
}
else
{
return false;
}
Objects.Reset();
//foreach (GeometryObject obj in geoArray)
while (Objects.MoveNext())
{
GeometryObject obj = Objects.Current;
if (obj is GeoInstance)
{
GeoInstance instance = (GeoInstance)obj;
InquireGeometry(instance.SymbolGeometry, elem);
}
else if (!(obj is Solid))
{
// is not Solid instance
continue;
}
// continue when obj is Solid instance
Solid solid = obj as Solid;
if (null == solid)
{
continue;
}
FaceArray faces = solid.Faces;
if (faces.IsEmpty)
{
continue;
}
// get the face name list
String category = String.Empty;
if (null != elem.Category && null != elem.Name)
{
category = elem.Category.Name;
}
int ii = 0;
foreach (Face tempFace in faces)
{
if (tempFace is PlanarFace)
{
m_faceNameList.Add(
String.Format("{0} : {1} ({2})", category, elem.Name, ii));
m_faceList.Add(tempFace);
ii++;
}
}
}
return true;
}
/// <summary>
/// Project a point on a face
/// </summary>
/// <param name="xyzArray">the face points, them fix a face </param>
/// <param name="point">the point</param>
/// <returns>the projected point on this face</returns>
static private Autodesk.Revit.DB.XYZ Project(List<XYZ> xyzArray, Autodesk.Revit.DB.XYZ point)
{
Autodesk.Revit.DB.XYZ a = xyzArray[0] - xyzArray[1];
Autodesk.Revit.DB.XYZ b = xyzArray[0] - xyzArray[2];
Autodesk.Revit.DB.XYZ c = point - xyzArray[0];
Autodesk.Revit.DB.XYZ normal = (a.CrossProduct(b));
try
{
normal = normal.Normalize();
}
catch (Exception)
{
normal = Autodesk.Revit.DB.XYZ.Zero;
}
Autodesk.Revit.DB.XYZ retProjectedPoint = point - (normal.DotProduct(c)) * normal;
return retProjectedPoint;
}
#endregion
}
}
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<RevitAddIns>
<AddIn Type="Command">
<Assembly>PlaceFamilyInstanceByFace.dll</Assembly>
<ClientId>019074e0-62a3-4a7d-96db-7ad184af64e3</ClientId>
<FullClassName>Revit.SDK.Samples.PlaceFamilyInstanceByFace.CS.Command</FullClassName>
<Text>Place FamilyInstance by face</Text>
<Description>Create family instance on face.</Description>
<VisibilityMode>AlwaysVisible</VisibilityMode>
<VendorId>ADSK</VendorId>
<VendorDescription>Autodesk, www.autodesk.com</VendorDescription>
</AddIn>
</RevitAddIns>
@@ -0,0 +1,123 @@
<?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>{ABD6F3DB-10CA-49B6-869E-843A16F79FF2}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Revit.SDK.Samples.PlaceFamilyInstanceByFace.CS</RootNamespace>
<AssemblyName>PlaceFamilyInstanceByFace</AssemblyName>
<StartupObject>
</StartupObject>
<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>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<DocumentationFile>
</DocumentationFile>
</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="BasedType.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="BasedType.Designer.cs">
<DependentUpon>BasedType.cs</DependentUpon>
</Compile>
<Compile Include="Command.cs" />
<Compile Include="FamilyInstanceCreator.cs" />
<Compile Include="PlaceFamilyInstanceForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="PlaceFamilyInstanceForm.Designer.cs">
<DependentUpon>PlaceFamilyInstanceForm.cs</DependentUpon>
</Compile>
<Compile Include="PointUserControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="PointUserControl.designer.cs">
<DependentUpon>PointUserControl.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="BasedType.resx">
<SubType>Designer</SubType>
<DependentUpon>BasedType.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PlaceFamilyInstanceForm.resx">
<SubType>Designer</SubType>
<DependentUpon>PlaceFamilyInstanceForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PointUserControl.resx">
<DependentUpon>PointUserControl.cs</DependentUpon>
<SubType>Designer</SubType>
</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,200 @@
//
// (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.
//
namespace Revit.SDK.Samples.PlaceFamilyInstanceByFace.CS
{
partial class PlaceFamilyInstanceForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.buttonCreate = new System.Windows.Forms.Button();
this.buttonCancel = new System.Windows.Forms.Button();
this.comboBoxFace = new System.Windows.Forms.ComboBox();
this.labelFace = new System.Windows.Forms.Label();
this.labelFamilySymbol = new System.Windows.Forms.Label();
this.comboBoxFamily = new System.Windows.Forms.ComboBox();
this.labelSecond = new System.Windows.Forms.Label();
this.labelFirst = new System.Windows.Forms.Label();
this.PointControlSecond = new Revit.SDK.Samples.PlaceFamilyInstanceByFace.CS.PointUserControl();
this.PointControlFirst = new Revit.SDK.Samples.PlaceFamilyInstanceByFace.CS.PointUserControl();
this.SuspendLayout();
//
// buttonCreate
//
this.buttonCreate.Location = new System.Drawing.Point(144, 159);
this.buttonCreate.Name = "buttonCreate";
this.buttonCreate.Size = new System.Drawing.Size(73, 23);
this.buttonCreate.TabIndex = 0;
this.buttonCreate.Text = "Crea&te";
this.buttonCreate.UseVisualStyleBackColor = true;
this.buttonCreate.Click += new System.EventHandler(this.buttonCreate_Click);
//
// buttonCancel
//
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(233, 159);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(73, 23);
this.buttonCancel.TabIndex = 16;
this.buttonCancel.Text = "&Cancel";
this.buttonCancel.UseVisualStyleBackColor = true;
//
// comboBoxFace
//
this.comboBoxFace.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxFace.FormattingEnabled = true;
this.comboBoxFace.Location = new System.Drawing.Point(92, 14);
this.comboBoxFace.Name = "comboBoxFace";
this.comboBoxFace.Size = new System.Drawing.Size(214, 21);
this.comboBoxFace.TabIndex = 7;
this.comboBoxFace.SelectedIndexChanged += new System.EventHandler(this.comboBoxFace_SelectedIndexChanged);
//
// labelFace
//
this.labelFace.AutoSize = true;
this.labelFace.Location = new System.Drawing.Point(9, 17);
this.labelFace.Name = "labelFace";
this.labelFace.Size = new System.Drawing.Size(37, 13);
this.labelFace.TabIndex = 24;
this.labelFace.Text = "Face :";
//
// labelFamilySymbol
//
this.labelFamilySymbol.AutoSize = true;
this.labelFamilySymbol.Location = new System.Drawing.Point(9, 49);
this.labelFamilySymbol.Name = "labelFamilySymbol";
this.labelFamilySymbol.Size = new System.Drawing.Size(82, 13);
this.labelFamilySymbol.TabIndex = 25;
this.labelFamilySymbol.Text = "Family Symbol :";
//
// comboBoxFamily
//
this.comboBoxFamily.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxFamily.FormattingEnabled = true;
this.comboBoxFamily.Location = new System.Drawing.Point(92, 46);
this.comboBoxFamily.MaxDropDownItems = 9;
this.comboBoxFamily.Name = "comboBoxFamily";
this.comboBoxFamily.Size = new System.Drawing.Size(214, 21);
this.comboBoxFamily.TabIndex = 26;
//
// labelSecond
//
this.labelSecond.AutoSize = true;
this.labelSecond.Location = new System.Drawing.Point(9, 115);
this.labelSecond.Name = "labelSecond";
this.labelSecond.Size = new System.Drawing.Size(62, 13);
this.labelSecond.TabIndex = 30;
this.labelSecond.Text = "End Point :";
//
// labelFirst
//
this.labelFirst.AutoSize = true;
this.labelFirst.Location = new System.Drawing.Point(9, 83);
this.labelFirst.Name = "labelFirst";
this.labelFirst.Size = new System.Drawing.Size(65, 13);
this.labelFirst.TabIndex = 29;
this.labelFirst.Text = "Start Point :";
//
// PointControlSecond
//
this.PointControlSecond.AutoSize = true;
this.PointControlSecond.Location = new System.Drawing.Point(90, 112);
this.PointControlSecond.Name = "PointControlSecond";
this.PointControlSecond.Size = new System.Drawing.Size(216, 24);
this.PointControlSecond.TabIndex = 28;
//
// PointControlFirst
//
this.PointControlFirst.AutoSize = true;
this.PointControlFirst.Location = new System.Drawing.Point(90, 79);
this.PointControlFirst.Name = "PointControlFirst";
this.PointControlFirst.Size = new System.Drawing.Size(216, 24);
this.PointControlFirst.TabIndex = 27;
//
// PlaceFamilyInstanceForm
//
this.AcceptButton = this.buttonCreate;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.buttonCancel;
this.ClientSize = new System.Drawing.Size(319, 193);
this.Controls.Add(this.PointControlSecond);
this.Controls.Add(this.PointControlFirst);
this.Controls.Add(this.labelSecond);
this.Controls.Add(this.labelFirst);
this.Controls.Add(this.comboBoxFamily);
this.Controls.Add(this.labelFamilySymbol);
this.Controls.Add(this.labelFace);
this.Controls.Add(this.comboBoxFace);
this.Controls.Add(this.buttonCancel);
this.Controls.Add(this.buttonCreate);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "PlaceFamilyInstanceForm";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Place Family Instance";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button buttonCreate;
private System.Windows.Forms.Button buttonCancel;
private System.Windows.Forms.ComboBox comboBoxFace;
private System.Windows.Forms.Label labelFace;
private System.Windows.Forms.Label labelFamilySymbol;
private System.Windows.Forms.ComboBox comboBoxFamily;
private PointUserControl PointControlSecond;
private PointUserControl PointControlFirst;
private System.Windows.Forms.Label labelSecond;
private System.Windows.Forms.Label labelFirst;
}
}
@@ -0,0 +1,240 @@
//
// (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.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Autodesk.Revit.DB;
namespace Revit.SDK.Samples.PlaceFamilyInstanceByFace.CS
{
/// <summary>
/// The main UI for creating family instance by face
/// </summary>
public partial class PlaceFamilyInstanceForm : System.Windows.Forms.Form
{
// the creator
private FamilyInstanceCreator m_creator = null;
// the base type
private BasedType m_baseType = BasedType.Point;
/// <summary>
/// Constructor
/// </summary>
/// <param name="creator">the family instance creator</param>
/// <param name="type">based-type</param>
public PlaceFamilyInstanceForm(FamilyInstanceCreator creator, BasedType type)
{
m_creator = creator;
m_creator.CheckFamilySymbol(type);
m_baseType = type;
InitializeComponent();
// set the face name list and the default value
foreach (String name in creator.FaceNameList)
{
comboBoxFace.Items.Add(name);
}
if (comboBoxFace.Items.Count > 0)
{
SetFaceIndex(0);
}
// set the family name list and the default value
foreach (String symbolName in m_creator.FamilySymbolNameList)
{
comboBoxFamily.Items.Add(symbolName);
}
if (m_creator.DefaultFamilySymbolIndex < 0)
{
comboBoxFamily.SelectedItem = m_creator.FamilySymbolNameList[0];
}
else
{
comboBoxFamily.SelectedItem =
m_creator.FamilySymbolNameList[m_creator.DefaultFamilySymbolIndex];
}
// set UI display according to baseType
switch (m_baseType)
{
case BasedType.Point:
this.Text = "Place Point-Based Family Instance";
labelFirst.Text = "Location :";
labelSecond.Text = "Direction :";
break;
case BasedType.Line:
comboBoxFamily.SelectedItem = "Line-based";
this.Text = "Place Line-Based Family Instance";
labelFirst.Text = "Start Point :";
labelSecond.Text = "End Point :";
break;
default:
break;
}
AdjustComboBoxDropDownListWidth(comboBoxFace);
AdjustComboBoxDropDownListWidth(comboBoxFamily);
}
/// <summary>
/// Get face information when the selected face is changed
/// </summary>
/// <param name="index">the index of the new selected face</param>
private void SetFaceIndex(int index)
{
comboBoxFace.SelectedItem = m_creator.FaceNameList[index];
BoundingBoxXYZ boundingBox = m_creator.GetFaceBoundingBox(index);
Autodesk.Revit.DB.XYZ totle = boundingBox.Min + boundingBox.Max;
switch (m_baseType)
{
case BasedType.Point:
PointControlFirst.SetPointData(totle / 2.0f);
PointControlSecond.SetPointData(new Autodesk.Revit.DB.XYZ(1.0f, 0f, 0f));
break;
case BasedType.Line:
PointControlFirst.SetPointData(boundingBox.Min);
PointControlSecond.SetPointData(boundingBox.Max);
break;
default:
break;
}
}
/// <summary>
/// Create a family instance according the selected options by user
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void buttonCreate_Click(object sender, EventArgs e)
{
bool retBool = false;
try
{
Transaction transaction = new Transaction(m_creator.RevitDoc.Document, "CreateFamilyInstance");
transaction.Start();
switch (m_baseType)
{
case BasedType.Point:
retBool = m_creator.CreatePointFamilyInstance(PointControlFirst.GetPointData()
, PointControlSecond.GetPointData()
, comboBoxFace.SelectedIndex
, comboBoxFamily.SelectedIndex);
break;
case BasedType.Line:
retBool = m_creator.CreateLineFamilyInstance(PointControlFirst.GetPointData()
, PointControlSecond.GetPointData()
, comboBoxFace.SelectedIndex
, comboBoxFamily.SelectedIndex);
break;
default:
break;
}
transaction.Commit();
}
catch (ApplicationException)
{
Autodesk.Revit.UI.TaskDialog.Show("Revit", "Failed in creating family instance, maybe because the family symbol is wrong type, please check and choose again.");
return;
}
catch (Exception ee)
{
Autodesk.Revit.UI.TaskDialog.Show("Revit", ee.Message);
return;
}
if (retBool)
{
this.Close();
this.DialogResult = DialogResult.OK;
}
else
{
Autodesk.Revit.UI.TaskDialog.Show("Revit", "The line is perpendicular to this face, please input the position again.");
}
}
/// <summary>
/// Process the SelectedIndexChanged event of comboBoxFace
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void comboBoxFace_SelectedIndexChanged(object sender, EventArgs e)
{
SetFaceIndex(comboBoxFace.SelectedIndex);
}
/// <summary>
/// Adjust the comboBox dropDownList width
/// </summary>
/// <param name="senderComboBox">the comboBox</param>
private void AdjustComboBoxDropDownListWidth(ComboBox senderComboBox)
{
Graphics g = null;
Font font = null;
try
{
int width = senderComboBox.Width;
g = senderComboBox.CreateGraphics();
font = senderComboBox.Font;
// checks if a scrollbar will be displayed.
// if yes, then get its width to adjust the size of the drop down list.
int vertScrollBarWidth =
(senderComboBox.Items.Count > senderComboBox.MaxDropDownItems)
? SystemInformation.VerticalScrollBarWidth : 0;
int newWidth;
foreach (object s in senderComboBox.Items) //Loop through list items and check size of each items.
{
if (s != null)
{
newWidth = (int)g.MeasureString(s.ToString().Trim(), font).Width
+ vertScrollBarWidth;
if (width < newWidth)
{
width = newWidth; //set the width of the drop down list to the width of the largest item.
}
}
}
senderComboBox.DropDownWidth = width;
}
catch
{ }
finally
{
if (g != null)
{
g.Dispose();
}
}
}
}
}
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
@@ -0,0 +1,163 @@
//
// (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.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using Autodesk.Revit.DB;
namespace Revit.SDK.Samples.PlaceFamilyInstanceByFace.CS
{
/// <summary>
/// Stand for the point data of this user control
/// </summary>
public partial class PointUserControl : UserControl
{
#region Constructors
/// <summary>
/// Default constructor of ModelLinesForm
/// </summary>
public PointUserControl()
{
// Required for Windows Form Designer support
InitializeComponent();
// initialize the TextBox data
xCoordinateTextBox.Text = "0";
yCoordinateTextBox.Text = "0";
zCoordinateTextBox.Text = "0";
}
#endregion
#region Public Methods
/// <summary>
/// Get the point data of this user control
/// </summary>
/// <returns>the point data stored in this control</returns>
public Autodesk.Revit.DB.XYZ GetPointData()
{
double x = 0; // Store the temporary x coordinate
double y = 0; // Store the temporary y coordinate
double z = 0; // Store the temporary z coordinate
x = Convert.ToDouble(xCoordinateTextBox.Text); // Get x coordinate
y = Convert.ToDouble(yCoordinateTextBox.Text); // Get x coordinate
z = Convert.ToDouble(zCoordinateTextBox.Text); // Get x coordinate
return new Autodesk.Revit.DB.XYZ(x, y, z);
}
/// <summary>
/// Set the point data of this user control
/// </summary>
/// <param name="data">the point data</param>
public void SetPointData(Autodesk.Revit.DB.XYZ data)
{
xCoordinateTextBox.Text = data.X.ToString("F2");
yCoordinateTextBox.Text = data.Y.ToString("F2");
zCoordinateTextBox.Text = data.Z.ToString("F2");
}
/// <summary>
/// Check the point data which the user input are integrated or not
/// </summary>
/// <returns>If the data are integrated return true, otherwise false</returns>
public bool AssertPointIntegrity()
{
if (String.IsNullOrEmpty(xCoordinateTextBox.Text) // x coordinate empty
|| String.IsNullOrEmpty(yCoordinateTextBox.Text) // y coordinate empty
|| String.IsNullOrEmpty(zCoordinateTextBox.Text)) // z coordinate empty
{
return false;
}
// If all coordinates are not empty, return true
return true;
}
#endregion
#region Private Methods
/// <summary>
/// This method is called to Validate whether the TextBox data is a number.
/// </summary>
/// <param name="sender">the event sender(can be all TextBox)</param>
/// <param name="e">contain event data(not used)</param>
void CoordinateTextBox_Validating(object sender, CancelEventArgs e)
{
// Check whether the sender is a TextBox reference
TextBox numberTextBox = sender as TextBox;
if (null == numberTextBox)
{
// If it is not a TextBox, just return
return;
}
// Invoke IsNumber() method to judge whether the input data are right
if (!IsNumber(numberTextBox.Text))
{
// If not, give error information, and set the text to be empty
Autodesk.Revit.UI.TaskDialog.Show("Revit", "Please input a double data.");
}
}
/// <summary>
/// Check whether the string data can represent a double number
/// </summary>
/// <param name="number">The test string</param>
/// <returns>If the string can represent a number return true, otherwise false</returns>
static public bool IsNumber(String number)
{
// First check whether the string is empty
if (String.IsNullOrEmpty(number))
{
// If the string is empty, return true
return true;
}
// Use Convert.ToDouble() method to changed string to double,
// If an exception is thrown out, that means the string can't change
try
{
// Invoke Convert.ToDouble() method
Convert.ToDouble(number);
}
catch (Exception)
{
return false;
}
// If everything goes well, return true
return true;
}
#endregion
}
}
@@ -0,0 +1,155 @@
//
// (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.
//
namespace Revit.SDK.Samples.PlaceFamilyInstanceByFace.CS
{
/// <summary>
/// Stand for the point data of this user control
/// </summary>
partial class PointUserControl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.secondBracketLabel = new System.Windows.Forms.Label();
this.secondCommaLabel = new System.Windows.Forms.Label();
this.firstCommaLabel = new System.Windows.Forms.Label();
this.zCoordinateTextBox = new System.Windows.Forms.TextBox();
this.yCoordinateTextBox = new System.Windows.Forms.TextBox();
this.xCoordinateTextBox = new System.Windows.Forms.TextBox();
this.firstBracketLabel = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// secondBracketLabel
//
this.secondBracketLabel.AccessibleRole = System.Windows.Forms.AccessibleRole.None;
this.secondBracketLabel.AutoSize = true;
this.secondBracketLabel.Location = new System.Drawing.Point(203, 4);
this.secondBracketLabel.Name = "secondBracketLabel";
this.secondBracketLabel.Size = new System.Drawing.Size(10, 13);
this.secondBracketLabel.TabIndex = 7;
this.secondBracketLabel.Text = ")";
//
// secondCommaLabel
//
this.secondCommaLabel.AutoSize = true;
this.secondCommaLabel.Location = new System.Drawing.Point(134, 7);
this.secondCommaLabel.Name = "secondCommaLabel";
this.secondCommaLabel.Size = new System.Drawing.Size(10, 13);
this.secondCommaLabel.TabIndex = 5;
this.secondCommaLabel.Text = ",";
//
// firstCommaLabel
//
this.firstCommaLabel.AutoSize = true;
this.firstCommaLabel.Location = new System.Drawing.Point(66, 8);
this.firstCommaLabel.Name = "firstCommaLabel";
this.firstCommaLabel.Size = new System.Drawing.Size(10, 13);
this.firstCommaLabel.TabIndex = 3;
this.firstCommaLabel.Text = ",";
//
// zCoordinateTextBox
//
this.zCoordinateTextBox.Location = new System.Drawing.Point(152, 1);
this.zCoordinateTextBox.Name = "zCoordinateTextBox";
this.zCoordinateTextBox.Size = new System.Drawing.Size(45, 20);
this.zCoordinateTextBox.TabIndex = 6;
this.zCoordinateTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.CoordinateTextBox_Validating);
//
// yCoordinateTextBox
//
this.yCoordinateTextBox.Location = new System.Drawing.Point(84, 1);
this.yCoordinateTextBox.Name = "yCoordinateTextBox";
this.yCoordinateTextBox.Size = new System.Drawing.Size(45, 20);
this.yCoordinateTextBox.TabIndex = 4;
this.yCoordinateTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.CoordinateTextBox_Validating);
//
// xCoordinateTextBox
//
this.xCoordinateTextBox.Location = new System.Drawing.Point(17, 1);
this.xCoordinateTextBox.Name = "xCoordinateTextBox";
this.xCoordinateTextBox.Size = new System.Drawing.Size(45, 20);
this.xCoordinateTextBox.TabIndex = 2;
this.xCoordinateTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.CoordinateTextBox_Validating);
//
// firstBracketLabel
//
this.firstBracketLabel.AutoSize = true;
this.firstBracketLabel.Location = new System.Drawing.Point(-1, 2);
this.firstBracketLabel.Name = "firstBracketLabel";
this.firstBracketLabel.Size = new System.Drawing.Size(10, 13);
this.firstBracketLabel.TabIndex = 1;
this.firstBracketLabel.Text = "(";
//
// PointUserControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.secondBracketLabel);
this.Controls.Add(this.secondCommaLabel);
this.Controls.Add(this.firstCommaLabel);
this.Controls.Add(this.zCoordinateTextBox);
this.Controls.Add(this.yCoordinateTextBox);
this.Controls.Add(this.xCoordinateTextBox);
this.Controls.Add(this.firstBracketLabel);
this.Name = "PointUserControl";
this.Size = new System.Drawing.Size(213, 24);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label secondBracketLabel;
private System.Windows.Forms.Label secondCommaLabel;
private System.Windows.Forms.Label firstCommaLabel;
private System.Windows.Forms.TextBox zCoordinateTextBox;
private System.Windows.Forms.TextBox yCoordinateTextBox;
private System.Windows.Forms.TextBox xCoordinateTextBox;
private System.Windows.Forms.Label firstBracketLabel;
}
}
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
@@ -0,0 +1,35 @@
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("PlaceFamilyInstanceByFace")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("hslcn")]
[assembly: AssemblyProduct("PlaceFamilyInstanceByFace")]
[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("98923d76-0f8a-4188-a5e0-c22cc14f7ab8")]
// 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,238 @@
{\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\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;}{\f40\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f41\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
{\f43\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f44\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f45\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f46\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
{\f47\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f48\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f50\fbidi \fswiss\fcharset238\fprq2 Arial CE;}{\f51\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;}
{\f53\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f54\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f55\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f56\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);}
{\f57\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f58\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f172\fbidi \fswiss\fcharset0\fprq2 SimSun Western{\*\falt \'91\'76\'91\'cc};}
{\f170\fbidi \fswiss\fcharset238\fprq2 SimSun CE{\*\falt \'91\'76\'91\'cc};}{\f171\fbidi \fswiss\fcharset204\fprq2 SimSun Cyr{\*\falt \'91\'76\'91\'cc};}{\f173\fbidi \fswiss\fcharset161\fprq2 SimSun Greek{\*\falt \'91\'76\'91\'cc};}
{\f174\fbidi \fswiss\fcharset162\fprq2 SimSun Tur{\*\falt \'91\'76\'91\'cc};}{\f176\fbidi \fswiss\fcharset178\fprq2 SimSun (Arabic){\*\falt \'91\'76\'91\'cc};}{\f177\fbidi \fswiss\fcharset186\fprq2 SimSun Baltic{\*\falt \'91\'76\'91\'cc};}
{\f178\fbidi \fswiss\fcharset163\fprq2 SimSun (Vietnamese){\*\falt \'91\'76\'91\'cc};}{\f432\fbidi \fswiss\fcharset0\fprq2 @SimSun Western;}{\f430\fbidi \fswiss\fcharset238\fprq2 @SimSun CE;}{\f431\fbidi \fswiss\fcharset204\fprq2 @SimSun Cyr;}
{\f433\fbidi \fswiss\fcharset161\fprq2 @SimSun Greek;}{\f434\fbidi \fswiss\fcharset162\fprq2 @SimSun Tur;}{\f436\fbidi \fswiss\fcharset178\fprq2 @SimSun (Arabic);}{\f437\fbidi \fswiss\fcharset186\fprq2 @SimSun Baltic;}
{\f438\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 \rsid6774958\rsid14039031}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\operator Lule}
{\creatim\yr2010\mo3\dy3\hr17\min21}{\revtim\yr2010\mo3\dy3\hr17\min22}{\version3}{\edmins1}{\nofpages2}{\nofwords404}{\nofchars2328}{\nofcharsws2727}{\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\rsidroot14039031 \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\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 Application:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 PlaceFamilyInstanceByFace\line }{\rtlch\fcs1
\ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 Revit Platform:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 All\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0
\b\f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 Revit Version:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 2011.0\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6774958
\hich\af1\dbch\af31505\loch\f1 First Released For:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 2009.0\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1
Programming Language:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 C#\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 Skill Level:}{\rtlch\fcs1
\af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 Medium\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 Category:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 Families\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 Type:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958
\hich\af1\dbch\af31505\loch\f1 ExternalCommand\line \line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 Subject:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958
\hich\af1\dbch\af31505\loch\f1 Create family instance on face.\line }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 Summary:}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958
\hich\af1\dbch\af31505\loch\f1 \line \hich\af1\dbch\af31505\loch\f1 This sample demonstrates how to create family instance on face.}{\rtlch\fcs1 \af0\afs21 \ltrch\fcs0 \f0\fs21\insrsid6774958
\par
\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 Classes:
\par }\pard \ltrpar\ql \fi360\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid14039031\charrsid14039031 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.UI.IExternalCommand}{\rtlch\fcs1 \af1\afs20
\ltrch\fcs0 \f1\fs20\insrsid14039031
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958\charrsid6774958 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.DB.FamilySymbol\hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 DB}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0
\f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 .FamilyInstance
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 DB}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 .Face
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 DB}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 .Options
\par \hich\af1\dbch\af31505\loch\f1 Autodesk.Revit.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 DB}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 .Solid
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs21 \ltrch\fcs0 \f0\fs21\insrsid6774958
\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 Project Files:}{\rtlch\fcs1 \af0\afs21 \ltrch\fcs0 \f0\fs21\insrsid6774958 \hich\af0\dbch\af31505\loch\f0
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 Command.cs
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\tx720\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1
This file contains the class Command which inherits from IExternalCommand interface and implements the Execute method.
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs21 \ltrch\fcs0 \f0\fs21\insrsid6774958
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 FamilyInstanceCreator.cs
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\tx720\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 This is main data cla\hich\af1\dbch\af31505\loch\f1
ss for creating family Instance by face}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6774958 .}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 It contains all operations in Revit.}{\rtlch\fcs1 \af0\afs20
\ltrch\fcs0 \f0\fs20\insrsid6774958
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\tx720\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6774958
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 PointUserControl.cs
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\tx720\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1
This class defines a user control for specifying point data which contains three text boxes for X, Y and Z coordinates of a point}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6774958 .
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1
\par \hich\af1\dbch\af31505\loch\f1 BasedType.cs
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\tx720\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1
This class contains a dialog which provides two options for user to choose the type to create the family instance. It provides two types - Point-based and Line-based.
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6774958
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 PlaceFamilyInstanceForm.cs
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\tx720\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 This file contains a dialog which provides options to specif
\hich\af1\dbch\af31505\loch\f1 y positions and face on which the family instance will be placed.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6774958
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs21 \ltrch\fcs0 \f0\fs21\insrsid6774958
\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 Description}{\rtlch\fcs1 \ab\af0\afs21 \ltrch\fcs0 \b\f0\fs21\insrsid6774958 \hich\af0\dbch\af31505\loch\f0 :}{\rtlch\fcs1 \af0\afs21 \ltrch\fcs0
\f0\fs21\insrsid6774958 \hich\af0\dbch\af31505\loch\f0
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 This sample will demonstrate how to create family instance on face.
\par }{\rtlch\fcs1 \af0\afs21 \ltrch\fcs0 \f0\fs21\insrsid6774958
\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 Instructions}{\rtlch\fcs1 \ab\af0\afs21 \ltrch\fcs0 \b\f0\fs21\insrsid6774958 \hich\af0\dbch\af31505\loch\f0 :}{\rtlch\fcs1 \af0\afs21 \ltrch\fcs0
\f0\fs21\insrsid6774958 \hich\af0\dbch\af31505\loch\f0
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 1.\tab Draw some elements with face geometry in current document}{
\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6774958 .
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 2.\tab Select an element and exec\hich\af1\dbch\af31505\loch\f1 ute the command
}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6774958 .
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 3.\tab \hich\f1 Choose a type in the \'93\loch\f1 \hich\f1 Based Type\'94\loch\f1 \hich\f1 dialog and click \'93\loch\f1 \hich\f1 Next\'94\loch\f1 button. }{
\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6774958
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 4.\tab Specify the face, family symbol and positions information. }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6774958
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 5.\tab \hich\f1 Click \'93\loch\f1 \hich\f1 Create\'94\loch\f1 button to create a family instance}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6774958 .
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs21 \ltrch\fcs0 \f0\fs21\insrsid6774958
\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 Notes}{\rtlch\fcs1 \ab\af0\afs21 \ltrch\fcs0 \b\f0\fs21\insrsid6774958 \hich\af0\dbch\af31505\loch\f0 :}{\rtlch\fcs1 \af0\afs21 \ltrch\fcs0
\f0\fs21\insrsid6774958 \hich\af0\dbch\af31505\loch\f0
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 1.\tab Prepare your Revit project.
\par }\pard \ltrpar\ql \li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 Open or new\hich\af1\dbch\af31505\loch\f1
a Revit project and make sure there are some face-based and point-based family symbols in the project. A sample project file PlaceFamilyInstanceByFace.rvt is available in the sample\hich\f1 \rquote \loch\f1 s folder.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0
\f0\fs20\insrsid6774958
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\tx360\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 2.\tab \hich\af1\dbch\af31505\loch\f1
Currently in API there is no good way to check whether a family symbol is face-based and point-based/line based. User must know clear about the family symbol selected to create a family instance. The sample will skip validating that and just provide messa
\hich\af1\dbch\af31505\loch\f1 g\hich\af1\dbch\af31505\loch\f1 e if creation fails. }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6774958
\par }\pard \ltrpar\ql \fi-360\li360\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin360\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 3.\tab \hich\f1
The default family symbol is the one provided in this sample. (Line: \'93\loch\f1 \hich\f1 Line-based\'94\loch\f1 \hich\f1 ; Point: \'93\loch\f1 \hich\f1 Point-based\'94\loch\f1 )}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6774958
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 4.\tab The default value of start point is the minimum point of this selected face. The default value of end point is the maxim\hich\af1\dbch\af31505\loch\f1
um point of this selected face. }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6774958
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 5.\tab The default value of location point is the center point in bounding box of the selected face}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6774958
\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \f1\fs20\insrsid6774958 \hich\af1\dbch\af31505\loch\f1 6.\tab Please copy the rfa files to the Revit installation folder or load them into current document if you use the DLL of this sam\hich\af1\dbch\af31505\loch\f1
ple directly in Revit. Nothing to do when you debug this project.}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6774958
\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\insrsid6774958
\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
ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffffec69d9888b8b3d4c859eaf6cd158be0f000000000000000000000000a026
6611b3baca01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000105000000000000}}