Files
2021-04-20 11:36:21 +02:00

43 lines
3.9 KiB
Plaintext

{\rtf1\fbidis\ansi\ansicpg1252\deff0\deflang1033\deflangfe2052{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}{\f1\froman\fprq2\fcharset0 Times New Roman;}}
{\colortbl ;\red0\green0\blue255;}
\viewkind4\uc1\pard\ltrpar\nowidctlpar\b\f0\fs20 Application:\b0 InPlaceMembers\line\b Revit Platform:\b0 Structure\line\b Revit Version:\b0 2011.0\line\b First Released For:\b0 9.0\line\b Programming Language:\b0 C#\line\b Skill Level:\b0 Medium\line\b Category:\b0 Families\line\b Type:\b0 ExternalCommand\line\line\b Subject:\b0 Display In-place Familyinstance properties.\line\b Summary:\b0 \line\fs24 \fs20 This sample demonstrates how to get the In-place Family instance and its properties in the current document of Revit.\par
\par
\b Classes:\b0 \par
\pard\ltrpar\nowidctlpar\fi180\li180 Autodesk.Revit.UI\lang1036 .IExternalCommand \par
\lang1033 Autodesk.Revit.DB\lang1036 .FamilyInstance\par
\lang1033 Autodesk.Revit.DB.Structure\lang1036 .AnalyticalModel\par
\lang1033 Autodesk.Revit.DB\lang1036 .Curve\par
\pard\ltrpar\nowidctlpar\li720\par
\pard\ltrpar\nowidctlpar\lang1033\b Project Files:\b0 \par
Command.cs\par
\pard\ltrpar\nowidctlpar\li360\tx720 This file contains a class Command that implements the IExternalCommand, the function of this class is to Retrieve values of an In-place Family instance\rquote s properties and send the data to UI.\par
\pard\ltrpar\nowidctlpar\par
GraphicsData.cs\par
\pard\ltrpar\nowidctlpar\li360\tx720 This file contains a class GraphicsData, the function of this class is to store the AnalyticalModel\rquote s curve points and implements some functionality to operate the Geometry: such as Rotate, Move\f1 ,\f0 etc.\f1\par
\pard\ltrpar\nowidctlpar\f0\par
GraphicsDataFactory.cs\par
\pard\ltrpar\nowidctlpar\li360\tx720 This file contains a class GraphicsDataFactory\f1 .\f0 The class just has a static method CreateGraphicsData to create a GraphicsData object.\par
\pard\ltrpar\nowidctlpar\par
PictureBox3D.cs\par
\pard\ltrpar\nowidctlpar\li360\tx720 This file contains a class PictureBox3D, the functionality of this class is to paint the geometry curves of the analytical model contained in a GraphicsData object.\f1\par
\pard\ltrpar\nowidctlpar\f0\par
Properties.cs\par
\pard\ltrpar\nowidctlpar\li360\tx720 This file contains a class Properties, this class stores all the properties\rquote values of FamilyInstance object\f1 .\par
\pard\ltrpar\nowidctlpar\f0\tab\par
InPlaceMembersForm.cs\par
\pard\ltrpar\nowidctlpar\li360\tx720 This file contains a class InPlaceMembersForm, the class inherits from Form and ImessageFilter. It uses a PictureBox3D to paint the analytical model\rquote s curves and a PropertyGrid to show the properties of selected FamilyInstance.\f1\par
\pard\ltrpar\nowidctlpar\f0\par
\b Description:\par
\b0 This sample retrieves the properties\rquote values of an In-place FamilyInstance, paints the analytical model of FamilyInstance in a PictureBox and shows other properties in a Property Grid. We can get the AnalyticalModel\rquote s profile via Curves property.\par
\tab\par
\b Instructions:\cf1\b0 \cf0\par
\pard\ltrpar\nowidctlpar\li780\f1\par
\pard\ltrpar\nowidctlpar\fi-360\li360\tx360\f0 1.\tab Open or new a Revit project and make sure at least one in-place FamilyInstance which contains AnalyticalModel is placed. A sample project file InPlaceMembers.rvt is available in the sample\rquote s folder.\f1\par
\f0 2.\tab Select an in-place FamilyInstance which contains AnalyticalModel\f1 .\par
\pard\ltrpar\nowidctlpar\fi-360\li360\f0 3.\tab Run the command.\f1\par
\pard\ltrpar\nowidctlpar\fi-360\li360\tx360\f0 4.\tab The Form will show the AnalyticalModel of the selected FamilyInstance. The geometry can be rotated\f1 ,\f0 moved and scaled via keys: \f1\par
\pard\ltrpar\nowidctlpar\fi100\li240\f0 - Rotate (Left, Right, Up, Down, PageUp, PageDown)\f1\par
\f0 - Move (S, W, A, D) \f1\par
\f0 - Scale (Home, End).\f1\par
}