C# Класс Revit.SDK.Samples.ModelLines.CS.ModelLines

The main deal class, which takes charge of showing the number of each model line type and creating one instance for each type using Revit API
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
CreateArc ( int sketchId, Autodesk startPoint, Autodesk endPoint, Autodesk thirdPoint ) : void

Create the arc(ModelArc)

CreateLine ( int sketchId, Autodesk startPoint, Autodesk endPoint ) : void

Create the line(ModelLine)

CreateOthers ( int sketchId, int elementId, Autodesk offsetPoint ) : void

Create other lines, including Ellipse, HermiteSpline and NurbSpline

CreateSketchPlane ( Autodesk normal, Autodesk origin ) : void

Create a new sketch plane which all model lines are placed on.

ModelLines ( Autodesk revit ) : System

The default constructor

RefreshInformationMap ( ) : void

Refresh the m_informationMap member, include the number of each model line type

Run ( ) : void

This is the main deal method in this example.

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

Метод Описание
GetElementById ( int id ) : Autodesk.Revit.DB.Element

Use Autodesk.Revit.DB.ElementId to get the corresponding element

GetModelLines ( ) : void

Get all model lines in current document of revit, and store them into the arrays

GetSketchPlane ( ) : void

Get all sketch planes in revit

GetSketchPlaneById ( int id ) : SketchPlane

Use Autodesk.Revit.DB.ElementId to get the corresponding sketch plane

InitDisplayInformation ( ) : void

Initiate the information map which will display in information DataGridView

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

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

Create the arc(ModelArc)
public CreateArc ( int sketchId, Autodesk startPoint, Autodesk endPoint, Autodesk thirdPoint ) : void
sketchId int the id of the sketch plane
startPoint Autodesk the start point of the arc
endPoint Autodesk the end point of the arc
thirdPoint Autodesk the third point which is on the arc
Результат void

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

Create the line(ModelLine)
public CreateLine ( int sketchId, Autodesk startPoint, Autodesk endPoint ) : void
sketchId int the id of the sketch plane
startPoint Autodesk the start point of the line
endPoint Autodesk the end point of the line
Результат void

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

Create other lines, including Ellipse, HermiteSpline and NurbSpline
public CreateOthers ( int sketchId, int elementId, Autodesk offsetPoint ) : void
sketchId int the id of the sketch plane
elementId int the element id which copy the curve from
offsetPoint Autodesk the offset direction from the copied line
Результат void

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

Create a new sketch plane which all model lines are placed on.
public CreateSketchPlane ( Autodesk normal, Autodesk origin ) : void
normal Autodesk
origin Autodesk
Результат void

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

The default constructor
public ModelLines ( Autodesk revit ) : System
revit Autodesk The reference of the application in revit
Результат System

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

Refresh the m_informationMap member, include the number of each model line type
public RefreshInformationMap ( ) : void
Результат void

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

This is the main deal method in this example.
public Run ( ) : void
Результат void