mirror of
https://github.com/jeremytammik/RevitSdkSamples.git
synced 2026-08-09 14:41:37 +00:00
39 lines
3.8 KiB
Plaintext
39 lines
3.8 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 CreateBeamsColumnsBraces\line\b Revit Platform:\b0 All\line\b Revit Version:\b0 2010.0\line\b First Released For:\b0 9.0\line\b Programming Language:\b0 VB.NET\line\b Skill Level:\b0 Medium\line\b Category:\b0 Parameters, Structure\line\b Type:\b0 ExternalCommand\line\line\b Subject:\b0 Create a frame with beams, columns and braces.\line\b Summary:\b0 \line This sample demonstrates how to create a truss model which composes of columns, beams and braces automatically according to the user\rquote s input.\cf1\par
|
|
\cf0\par
|
|
\b Classes:\b0 \par
|
|
\pard\ltrpar\nowidctlpar\fi360 Autodesk.Revit.DB.IExternalCommand \par
|
|
Autodesk.Revit.DB.FamilySymbol\f1\par
|
|
\par
|
|
\pard\ltrpar\nowidctlpar\b\f0 Project Files:\b0 \cf1\par
|
|
\cf0 CreateBeamsColumnsBraces.vb\par
|
|
\pard\ltrpar\nowidctlpar\li360\tx720 This is the main DLL source file. It contains the class Command which implements the interface IExternalCommand. Command class also collects all the symbols of levels, columns, beams & braces in current document and takes charge of creating a truss model.\f1\par
|
|
\pard\ltrpar\nowidctlpar\f0\par
|
|
CreateBeamsColumnsBracesForm.vb\par
|
|
\pard\ltrpar\nowidctlpar\li360\tx720 This file contains the CreateBeamsColumnsBracesForm class which is the sample\rquote s UI to collect user\rquote s input.\par
|
|
\pard\ltrpar\nowidctlpar\fi400\f1\par
|
|
\pard\ltrpar\nowidctlpar\b\f0 Description:\b0 \par
|
|
\pard\ltrpar\nowidctlpar\fi-357\li357\tx357 -\tab Presents a dialog to ask the user for the following information, and create truss model according to these information.\par
|
|
\pard\ltrpar\nowidctlpar\fi-363\li720\tx720 -\tab Distance between columns\par
|
|
\pard\ltrpar\nowidctlpar\fi-363\li720 -\tab Number of Columns in the X direction\par
|
|
-\tab Number of Columns in the Y direction\par
|
|
-\tab The type of the columns\par
|
|
-\tab The type of the beams\par
|
|
-\tab The type of the braces\par
|
|
-\tab Number of Floors\par
|
|
\pard\ltrpar\nowidctlpar\fi-357\li357\tx357 -\tab The code should verify whether the number of floors is less than the number of levels since columns will be inserted from the level below to the level above. If there are not enough levels, notify the user the number of levels that must be added and exit the command with a failure message.\par
|
|
\pard\ltrpar\nowidctlpar\fi-357\li357 -\tab Levels can be retrieved by iterating through the document elements. \par
|
|
-\tab The types that can be used for the beams, columns and braces can be located by searching the database for FamilySymbol objects that have material type of something other than undefined.\par
|
|
-\tab All inserted beams, columns and braces must be specified as structural during creation.\par
|
|
-\tab To insert a beam use the NewFamilyInstance method that takes a location and a reference direction. Location point should be the start of the beam and the reference direction should be a vector along the direction of the beam.\f1\fs24 \f0\fs20 Specify the structural type as beam.\par
|
|
-\tab To insert a brace do the same as for a beam but specify brace as the structural type.\par
|
|
\pard\ltrpar\nowidctlpar\fi-420\li420\tx420\tab\par
|
|
\pard\ltrpar\nowidctlpar\b Instructions:\cf1\b0 \cf0\par
|
|
\pard\ltrpar\nowidctlpar\fi-360\li360\tx360 1.\tab No context to execute this sample, please directly run this command.\par
|
|
\pard\ltrpar\nowidctlpar\fi-360\li360 2.\tab User can input or select valid values in the sample UI (certainly, we can use the default values).\par
|
|
3.\tab Then click OK button.\par
|
|
4.\tab Expected result: return to Revit main program after run this sample, a Columns Beams and Braces truss model will present.\par
|
|
\pard\ltrpar\nowidctlpar\par
|
|
}
|
|
|