C# Класс BuildingCoder.CmdCollectorPerformance

Наследование: IExternalCommand
Показать файл Открыть проект

Открытые методы

Метод Описание
CreateFamilyTreeTest ( Document myDoc ) : void
Execute ( ExternalCommandData commandData, string &message, ElementSet elements ) : Result
GetElementViews ( List a, List views ) : List
GetViewsAndDrawingSheets ( Document doc, List views, List viewSheets ) : void
GetViewsAndDrawingSheets1 ( Document doc, List views, List viewSheets ) : void

Приватные методы

Метод Описание
BenchmarkAllLevels ( int nLevels ) : void

Benchmark several different approaches to using filtered collectors to retrieve all levels in the model, and measure the time required to create IList and List collections from them.

BenchmarkSpecificLevel ( int iLevel ) : void

Benchmark the use of a parameter filter versus various kinds of post processing of the results returned by the filtered element collector to find the level specified by iLevel.

CreateLevel ( int elevation ) : Level

Create a new level at the given elevation.

EmptyMethod ( Type type ) : Element

An empty method that does nothing.

EmptyMethod ( Type type, string name ) : Element

An empty method that does nothing.

Factory ( Document doc, string familySymbolName ) : IList
FilterRule ( Document doc, string familySymbolName ) : IList
GetAllDetailComponentCustomParamValues ( Document doc ) : double>.Dictionary

Retrieve all Detail Component family instances, read the custom parameter value from each, assuming it is a real number, and return a dictionary mapping all element ids to the corresponding param values.

GetAllElementsUsingType ( Document doc, ElementType et ) : FilteredElementCollector

Return the all elements that use the given ElementType.

GetAllModelElements ( Document doc ) : IEnumerable

Return all model elements, cf. http://forums.autodesk.com/t5/revit-api/traverse-all-model-elements-in-a-project-top-down-approach/m-p/5815247

GetBeamsIntersectingTwoColumns ( Element column1, Element column2 ) : FilteredElementCollector

Retrieve all beam family instances intersecting two columns, cf. http://forums.autodesk.com/t5/revit-api/check-to-see-if-beam-exists/m-p/6223562

GetElementsMatchingParameter ( Document doc, string paramName, string paramGroup, string paramValue ) : IList

Return a list of all elements with the specified value in their shared parameter with the given name oand group. They are retrieved using a parameter filter, and the required parameter id is found by temporarily adding the shared parameter to the project info.

GetElementsOfType ( Type type ) : FilteredElementCollector

Return a collector of all elements of the given type.

GetElementsOfTypeUsingExplicitCode ( Type type ) : List

Return a list of all elements matching the given type using explicit code to test the element type.

GetElementsOfTypeUsingLinq ( Type type ) : IEnumerable

Return a list of all elements matching the given type using a LINQ query to test the element type.

GetFirstElementOfType ( Type type ) : Element

Return the first element of the given type without any further filtering.

GetFirstElementOfTypeWithBipString ( Type type, BuiltInParameter bip, string name ) : Element

Use a parameter filter to return the first element of the given type and with the specified string-valued built-in parameter matching the given name.

GetFirstNamedElementOfTypeUsingAnonymousButNamedMethod ( Type type, string name ) : Element

Return the first element of the given type and name using an anonymous method to define a named method.

GetFirstNamedElementOfTypeUsingAnonymousMethod ( Type type, string name ) : Element

Return the first element of the given type and name using an anonymous method.

GetFirstNamedElementOfTypeUsingExplicitCode ( Type type, string name ) : Element

Return the first element of the given type and name using explicit code.

GetFirstNamedElementOfTypeUsingLinq ( Type type, string name ) : Element

Return the first element of the given type and name using LINQ.

GetInstancesIntersectingElement ( Element e ) : void

Retrieve all family instances intersecting a given BIM element, e.g. all columns intersecting a wall.

GetModelExtents ( Document doc ) : BoundingBoxXYZ

Return a bounding box enclosing all model elements using only quick filters.

GetNonElementTypeElements ( ) : FilteredElementCollector

Return all non ElementType elements.

GetOpeningsInWall ( Document doc, Wall wall ) : void

Retrieve all openings in a given wall.

GetSortedLevels ( Document doc ) : IOrderedEnumerable
GetStairsOnLevel ( Document doc, Level level ) : FilteredElementCollector

Retrieve all stairs on a given level.

GetStructuralColumnSymbolCollector ( Document doc ) : FilteredElementCollector
IsElementHiddenInView ( Element e, View v ) : bool

Checks whether a given Revit element 'e' is hidden in a specified view 'v'. If v has a crop box defined, e is considered hidden if its bounding box is outside or less than 25% contained in the crop box. If e is not eliminated as hidden by that test, its IsHidden predicate is checked, followed by the visibility of its category and all its parent categories in the given view. Return true if the given element e is hidden in the view v. This might be due to: - e lies outside the view crop box - e is specifically hidden in the view, by element - the category of e or one of its parent categories is hidden in v.

IterateOverCollector ( Document doc ) : IEnumerable

Iterate directly over the filtered element collector. In general, there is no need to create a copy of it. Calling ToElements creates a copy, allocating space for that and wasting both memory and time. No need to cast either, foreach can do that automatically.

Linq ( Document doc, string familySymbolName ) : IList
Linq2 ( Document doc, string familySymbolName ) : IList
RunBenchmark ( ) : void
TraverseInstances ( Document doc ) : void
f ( ) : void
f1 ( Document doc ) : void
f2 ( ) : void
f2 ( Document doc, Level level ) : void
f3 ( ) : void
f3 ( Document doc ) : void
f4 ( Document doc ) : void
f_detail_curves ( ) : void
f_ramps ( Document doc ) : void
f_views ( ) : void
findConcreteRamps ( Document doc ) : IEnumerable

Описание методов

CreateFamilyTreeTest() публичный статический Метод

public static CreateFamilyTreeTest ( Document myDoc ) : void
myDoc Document
Результат void

Execute() публичный Метод

public Execute ( ExternalCommandData commandData, string &message, ElementSet elements ) : Result
commandData ExternalCommandData
message string
elements ElementSet
Результат Result

GetElementViews() публичный статический Метод

public static GetElementViews ( List a, List views ) : List
a List
views List
Результат List

GetViewsAndDrawingSheets() публичный статический Метод

public static GetViewsAndDrawingSheets ( Document doc, List views, List viewSheets ) : void
doc Document
views List
viewSheets List
Результат void

GetViewsAndDrawingSheets1() публичный статический Метод

public static GetViewsAndDrawingSheets1 ( Document doc, List views, List viewSheets ) : void
doc Document
views List
viewSheets List
Результат void