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

62 lines
6.0 KiB
Plaintext

{\rtf1\fbidis\ansi\ansicpg1252\deff0\deflang1033\deflangfe1033\deftab420{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}{\f1\fnil\fprq2\fcharset134 SimSun;}{\f2\froman\fprq2\fcharset0 Times New Roman;}}
{\info{\horzdoc}{\*\lchars ([\'7b\'b7\'91\'93<\'ab?????(.[\'7b??}{\*\fchars !),.:\'3b?]\'7d\'a8\'b7?\'af??\'92\'94\'85:????>\'bb?????!"'),.:\'3b?]`|\'7d~?}}
\viewkind4\uc1\pard\ltrpar\nowidctlpar\kerning2\b\f0\fs20 Application:\b0 ShaftHolePuncher\line\b Revit Platform:\b0 All\line\b Revit Version:\b0 2011.0\line\b First Released For:\b0 2008.0\line\b Programming Language:\b0 C#\line\b Skill Level:\b0 High\line\b Category:\b0 Geometry, Elements\line\b Type:\b0 ExternalCommand\line\line\b Subject:\b0 Create all Kinds Opening.\line\b Summary:\b0 \line\kerning0 This sample demonstrates how to create single or Shaft Opening on a wall, floor or beam.\par
\pard\ltrpar\nowidctlpar\qj\kerning2\b \par
Classes: \par
\pard\ltrpar\nowidctlpar\fi360\kerning0\b0 Autodesk.Revit.UI.IExternalCommand\par
Autodesk.Revit.DB.Opening\par
Autodesk.Revit.DB.FamilyInstance\par
Autodesk.Revit.DB.Level\par
Autodesk.Revit.DB.Face\par
Autodesk.Revit.DB.Edge\par
Autodesk.Revit.DB.Solid\par
Autodesk.Revit.DB.Instance\par
Autodesk.Revit.DB.Transform\par
Autodesk.Revit.DB.CurveArray\par
Autodesk.Revit.Creation.Document\par
\pard\ltrpar\nowidctlpar\qj\kerning2\par
\b Project Files: \par
\b0 Command.cs\par
\pard\ltrpar\nowidctlpar\li360\kerning0 This file contains a class Command that implements the IExternalCommand, gets the selected wall, floor or beam and creates Opening on it.\par
\par
\pard\ltrpar\nowidctlpar\qj\kerning2 ShaftHolePuncherForm.cs\par
\pard\ltrpar\nowidctlpar\li360\kerning0 This file contains a class \kerning2 ShaftHolePuncherForm\kerning0 which inherits from Form. The function of this class is to display profile of the selected wall, floor or beam and let user draw profile of Opening on it. If user wants to create a Shaft Opening, a coordinate system will be shown.\par
\par
\pard\ltrpar\nowidctlpar\qj\kerning2 Profile.cs\par
\pard\ltrpar\nowidctlpar\li360\tx720\kerning0 This file contains a class Profile which is derived by ProfileWall, ProfileFloor, ProfileBeam ProfileNull. Profile includes methods Draw2D() and CreateOpening(). Draw2D() is used to draw profile on the form, and CreateOpening() is used to create Opening on the corresponding host.\par
\pard\ltrpar\nowidctlpar\tx720\par
ProfileNull.cs\par
\pard\ltrpar\nowidctlpar\li360\tx720 This file contains a class ProfileNull derived from Profile. ProfileNull overrides Draw2D() and CreateOpening(). Draw2D() is used to draw the coordinate system to help user to draw a curve loop for Shaft Opening, and CreateOpening() is used to create Shaft Opening.\par
\par
\pard\ltrpar\nowidctlpar\tx720 ProfileBeam.cs\par
\pard\ltrpar\nowidctlpar\li360\tx720 This file contains a class ProfileBeam derived from Profile. ProfileBeam overrides\kerning2\f1\fs21 \kerning0\f0\fs20 GetTo2DMatrix(), Draw2D() and CreateOpening() methods. Draw2D() is used to draw the profile of a beam (user can change the direction to create opening via a combo box), and CreateOpening() is used to create opening on a beam.\par
\pard\ltrpar\nowidctlpar\fi360\qj\kerning2\f2\par
\pard\ltrpar\nowidctlpar\qj\f0 LineTool.cs\par
\pard\ltrpar\nowidctlpar\li360\tx720\kerning0 This file contains a class named LineTool which provides some methods to draw lines on the form and store the data of drawn lines.\par
\par
\pard\ltrpar\nowidctlpar\qj\kerning2 RectangleTool.cs\par
\pard\ltrpar\nowidctlpar\li360\tx720\kerning0 This file contains a class named \kerning2 RectangleTool\kerning0 which provides some methods to draw rectangle on the form and store the data of drawn rectangle.\par
\par
\pard\ltrpar\nowidctlpar\qj\kerning2 MathTools.cs\par
\pard\ltrpar\nowidctlpar\li360\tx720\kerning0 This file contains Verctor4 and Matrix4 two classes. These two classes are used to transform points between 3D and 2D.\par
\pard\ltrpar\nowidctlpar\qj\kerning2\f2\par
\b\f0 Description:\b0 \par
\pard\ltrpar\nowidctlpar This sample shows user how to create Opening by \par
Autodesk.Revit.Creation.Document.NewOpening(\'85) method, this method has four overloads:\par
\pard\ltrpar\nowidctlpar\fi-360\li360\tx360\f2 -\tab\f0 NewOpening(Element, CurveArray, eRefFace) is used to create Opening in a beam, brace or column. eRefFace is used to define a face which opening is based on.\par
\pard\ltrpar\nowidctlpar\f2 -\tab\f0 NewOpening(Element, CurveArray, bool) <mk:@MSITStore:C:\\Program%20Files\\Autodesk%20Revit%20Building%2010\\Program\\RevitAPI.chm::/Autodesk.Revit.Creation.Document.NewOpening_overload_2.html> is used to create Opening on roof, floor or ceiling, bool value is used to indicate whether it is to cut perpendicular to the face or cut vertically.\par
-\tab NewOpening(Level, Level, CurveArray) is used to create Shaft Opening.\par
-\tab NewOpening(Wall, ref XYZ, ref XYZ) is used to create Opening on Wall.\par
\pard\ltrpar\nowidctlpar\qj\f2\par
\b\f0 Instructions:\b0 \par
\pard\ltrpar\nowidctlpar\fi-420\li420\qj\tx420 1.\tab Draw a wall, floor or beam and select it. Do not select anything if you want to create a Shaft Opening. (or open ShaftHolePuncher.rvt)\par
\pard\ltrpar\nowidctlpar\fi-420\li420\qj 2.\tab Run this command.\par
3.\tab Draw the profile of Opening you want to create, click right mouse button to close the curve and finish drawing.\par
4.\tab If user wants to create Opening on beam, user can change the direction to create opening by the combo box. And picture box will draw the profile of beam in the corresponding direction.\par
5.\tab If this is a Shaft Opening, user can draw a curve in the displayed coordinate system, and select the scale coefficient in the combo box to scale it. Command will create a shaft opening from level1 to level2.\par
6.\tab User can clean and redraw the profile of opening by clicking \ldblquote Clean\rdblquote button.\par
7.\tab Click \ldblquote Create\rdblquote button will create Opening in Revit when you finish the curve.\par
\pard\ltrpar\nowidctlpar\qj\f2\fs21\par
\par
}