Files
2024-12-12 10:25:07 +01:00

36 lines
3.6 KiB
Plaintext

{\rtf1\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\b\f0\fs20 Application:\b0 TraverseSystem\line\b Revit Platform:\b0 MEP\line\b Revit Version:\b0 2010.0\line\b First Released For:\b0 2010.0 \line\b Last Modified:\b0 09/11/2008\line\b Modified By:\b0 LL Autodesk\line\b Programming Language:\b0 C#\line\b Skill Level:\b0 Medium\line\b Category:\b0 MEP\line\b Type:\b0 ExternalCommand\line\line\b Subject:\b0 Traverse a well-connected mechanical or piping system in the direction of flow\f1 .\f0\line\b Summary:\b0 \line This sample shows how to traverse a well-connected mechanical or piping system in the direction of flow and dump the traversal into an XML file.\i\f1\par
\i0\par
\b\f0 Classes:\b0 \par
\pard\fi180\li180\lang1036 Autodesk.Revit.IExternalCommand\f1\par
\f0 Autodesk.Revit.Document\par
Autodesk.Revit.MEP\par
Autodesk.Revit.Elements\par
\f1\par
\pard\lang1033\b\f0 Project Files:\b0 \i\par
\i0 Command.cs\f1\par
\pard\li360\lang1036\f0 It contains the class Command which inherits from interface IExternalCommand and implements the Execute\lang1033 method\lang1036 . \lang1033 It also retrieves the well-connected mechanical or piping system from user selection.\lang1036\f1\par
\pard\par
\lang1033\f0 TraversalTree.cs\f1\par
\pard\li360\lang1036\f0 It contains two classes TreeNode and TraversalTree\f1 .\f0 A TreeNode object represents an element in the system and it contains connection clues for the traversal. Class TraversalTree traverses the specified system in the direction of flow by generating a tree-like structure of TreeNode objects\f1 .\par
\pard\lang1033\b\par
\f0 Description:\b0 \f1\par
\f0 This sample provides following functionalities.\f1\par
\pard\fi-360\li360\tx360\f0 -\tab Retrieve the well-connected mechanical or piping systems from the selected element which can be the system itself or any element in the system. If the selected element belongs to more than one well-connected system, the system has the most elements will be chosen.\f1\par
\pard\fi-360\li360\f0 -\tab Start to traverse the system from the base equipment of the system. If the system has no base equipment, it will have an open connector which is the only point that can connect to a base equipment. The owner of the open connector will be chosen as the starting point.\par
-\tab Analyze the relationships of connected elements in the system by their connectors\rquote flow directions and generate the traversal tree-like structure\f1 .\par
\pard\fi-360\li360\tx360\f0 -\tab Dump the traversal into an XML file.\f1\par
\pard\par
\b\f0 Instructions:\cf1\b0 \f1\par
\pard\fi-360\li360\tx360\cf0\f0 1.\tab Add the following lines to the Revit.ini file.\par
\pard\li360 [ExternalCommands]\par
ECCount=1\par
ECName1 = TraverseSystem\f1\par
\f0 ECClassName1 = Revit.SDK.Samples.TraverseSystem.CS.Command\par
ECAssembly1 = (\i your path\i0 )\\TraverseSystem.dll\par
ECDescription1 = Traverse a mechanical or piping system in the direction of flow\par
\pard\fi-360\li360\tx360 2.\tab Open Revit MEP application, then open a project which contains well-connected systems or draw well-connected systems in a new project; select a well-connected mechanical or piping system or an element in a well-connected system. Then execute the command\f1 .\f0\par
3.\tab The sample will traverse the system in the direction of flow\f1 .\f0 Finally it will dump the traversal into the XML file \ldblquote traversal.xml\rdblquote in the same folder as file \ldblquote TraverseSystem.dll\rdblquote .\par
}