C# Class 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
Afficher le fichier Open project: AMEE/revit Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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

Method Details

CreateArc() public méthode

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
Résultat void

CreateLine() public méthode

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
Résultat void

CreateOthers() public méthode

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
Résultat void

CreateSketchPlane() public méthode

Create a new sketch plane which all model lines are placed on.
public CreateSketchPlane ( Autodesk normal, Autodesk origin ) : void
normal Autodesk
origin Autodesk
Résultat void

ModelLines() public méthode

The default constructor
public ModelLines ( Autodesk revit ) : System
revit Autodesk The reference of the application in revit
Résultat System

RefreshInformationMap() public méthode

Refresh the m_informationMap member, include the number of each model line type
public RefreshInformationMap ( ) : void
Résultat void

Run() public méthode

This is the main deal method in this example.
public Run ( ) : void
Résultat void