C# Class Revit.SDK.Samples.PlaceFamilyInstanceByFace.CS.FamilyInstanceCreator

This is main data class for creating family Instance by face
ファイルを表示 Open project: AMEE/revit Class Usage Examples

Public Methods

Method Description
CheckFamilySymbol ( BasedType type ) : void

1. Find all family symbols in current Revit document and store them 2. Find the index of default family symbol Point("Point-based"); Line("Line-based")

CheckSelectedElementSet ( ) : bool

Judge whether the selected elementSet has face geometry

CreateLineFamilyInstance ( Autodesk startP, Autodesk endP, int faceIndex, int familySymbolIndex ) : bool

Create a based-line family instance by face

CreatePointFamilyInstance ( Autodesk locationP, Autodesk directionP, int faceIndex, int familySymbolIndex ) : bool

Create a based-point family instance by face

FamilyInstanceCreator ( Autodesk app ) : System

Constructor, Store the Revit application

GetFaceBoundingBox ( int indexFace ) : BoundingBoxXYZ

Get the bounding box of a face, the BoundingBoxXYZ will be set in UI as default value

Private Methods

Method Description
CheckSelectedElement ( Autodesk.Revit.DB.Element elem ) : bool

Judge whether an element has face geometry

InquireGeometry ( Autodesk.Revit.DB.GeometryElement geoElement, Autodesk.Revit.DB.Element elem ) : bool

Inquire an geometry element to get all face instances

Project ( List xyzArray, Autodesk point ) : Autodesk.Revit.DB.XYZ

Project a point on a face

Method Details

CheckFamilySymbol() public method

1. Find all family symbols in current Revit document and store them 2. Find the index of default family symbol Point("Point-based"); Line("Line-based")
public CheckFamilySymbol ( BasedType type ) : void
type BasedType
return void

CheckSelectedElementSet() public method

Judge whether the selected elementSet has face geometry
public CheckSelectedElementSet ( ) : bool
return bool

CreateLineFamilyInstance() public method

Create a based-line family instance by face
public CreateLineFamilyInstance ( Autodesk startP, Autodesk endP, int faceIndex, int familySymbolIndex ) : bool
startP Autodesk the start point
endP Autodesk the end point
faceIndex int the index of the selected face
familySymbolIndex int the index of the selected family symbol
return bool

CreatePointFamilyInstance() public method

Create a based-point family instance by face
public CreatePointFamilyInstance ( Autodesk locationP, Autodesk directionP, int faceIndex, int familySymbolIndex ) : bool
locationP Autodesk the location point
directionP Autodesk the direction
faceIndex int the index of the selected face
familySymbolIndex int the index of the selected family symbol
return bool

FamilyInstanceCreator() public method

Constructor, Store the Revit application
public FamilyInstanceCreator ( Autodesk app ) : System
app Autodesk
return System

GetFaceBoundingBox() public method

Get the bounding box of a face, the BoundingBoxXYZ will be set in UI as default value
public GetFaceBoundingBox ( int indexFace ) : BoundingBoxXYZ
indexFace int the index of face
return BoundingBoxXYZ