C# Class RoomEditorApp.CmdUploadRooms

Inheritance: IExternalCommand
Mostrar archivo Open project: jeremytammik/RoomEditorApp Class Usage Examples

Public Methods

Method Description
Execute ( ExternalCommandData commandData, string &message, ElementSet elements ) : System.Result
UploadRoom ( Document doc, Room room ) : void

Upload the selected rooms and the furniture they contain to the cloud database.

Private Methods

Method Description
AddLoops ( Autodesk creapp, JtLoops loops, GeometryObject obj, int &nExtrusionAnalysisFailures ) : int

Add all plan view boundary loops from given solid to the list of loops. The creation application argument is used to reverse the extrusion analyser output curves in case they are badly oriented.

GetFurniture ( Room room ) : List

Return the element ids of all furniture and equipment family instances contained in the given room.

GetLoop ( Autodesk creapp, Face face ) : JtLoop

Return a closed loop of integer-based points scaled to millimetres from a given Revit model face in feet.

GetPlanViewBoundaryLoops ( Element e, int &nFailures ) : JtLoops

Retrieve all plan view boundary loops from all solids of given element united together. If the element is a family instance, transform its loops from the instance placement coordinate system back to the symbol definition one. If no geometry can be determined, use the bounding box instead.

GetPlanViewBoundaryLoopsGeo ( Autodesk creapp, GeometryElement geo, int &nFailures ) : JtLoops

Retrieve all plan view boundary loops from all solids of the given element geometry united together.

GetPlanViewBoundaryLoopsMultiple ( Element e, int &nFailures ) : JtLoops

Retrieve all plan view boundary loops from all solids of given element. This initial version passes each solid encountered in the given element to the ExtrusionAnalyzer one at a time, which obviously results in multiple loops, many of which are contained within the others. An updated version unites all the solids first and then uses the ExtrusionAnalyzer once only to obtain the true outside shadow contour.

GetRoomLoops ( Room room ) : JtLoops

Retrieve the room plan view boundary polygon loops and convert to 2D integer-based. For optimisation and consistency reasons, convert all coordinates to integer values in millimetres. Revit precision is limited to 1/16 of an inch, which is abaut 1.2 mm, anyway.

ListLoops ( Element e, JtLoops loops ) : void

List all the loops retrieved from the given element.

Method Details

Execute() public method

public Execute ( ExternalCommandData commandData, string &message, ElementSet elements ) : System.Result
commandData ExternalCommandData
message string
elements ElementSet
return System.Result

UploadRoom() public static method

Upload the selected rooms and the furniture they contain to the cloud database.
public static UploadRoom ( Document doc, Room room ) : void
doc Document
room Room
return void