C# Класс Revit.SDK.Samples.PlaceFamilyInstanceByFace.CS.FamilyInstanceCreator

This is main data class for creating family Instance by face
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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

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

Метод Описание
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

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

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

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
Результат void

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

Judge whether the selected elementSet has face geometry
public CheckSelectedElementSet ( ) : bool
Результат bool

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

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
Результат bool

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

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
Результат bool

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

Constructor, Store the Revit application
public FamilyInstanceCreator ( Autodesk app ) : System
app Autodesk
Результат System

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

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
Результат BoundingBoxXYZ