Comment secondary development of Revit

  1. Dimensions

Dimension is used to display the distance and size of the specific elements of the view, the view elements, only those elements that can be displayed in a particular view in the project. For example dimension (Dimension) can only be displayed in the plan view. Into three main dimensions:

Temporary dimension (Temporary Dimensions): the dimensions of some reference line Revit In operation temporarily add these revit API is not accessible.

Permanent dimensions (Permanent Dimensions): annotating in plan view, can be created via the API.

Elevation Points dimension (Spot Dimensions): Add elevation view, it can be created via the API.

1.1 type of permanent mark

Dimensions alignment: alignment dimensions of REVIT view-specific elements, placed only displayed views ( plan or section view ) , aligned parallel dimensions for annotating two or more of two or more reference the distance between the reference point.

Autodesk.Revit.Creation.Document.NewAlignemnt(View,Reference ref1, Reference ref2);

Linear dimension: linear dimensions is placed between the selected point. The horizontal dimension of the view axis or vertical axis aligned

Autodesk.Revit.Creation.Document.NewAlignemnt(View,Line line, ReferenceArray refs);

Angular dimension: is used to mark a point of view of size, he must specify another arc in order to determine the direction of the marker.

Autodesk.Revit.Creation.Document.NewAlignemnt(View,Arc arc, Reference ref1, Reference ref2);

The arc length dimension: user marking an arc length

Autodesk.Revit.Creation.Document.NewAlignemnt(View,Arc arc, Reference arcRef, Reference ref1, Reference ref2);

Diameter dimensions: a diameter of a circular mark length

Autodesk.Revit.Creation.Document.NewAlignemnt(View,Arc arc, Reference arcRef1, XYZ orgin);

Radial dimensions: mainly used to specify the travel or arc dimension

Autodesk.Revit.Creation.Document.NewAlignemnt(View,Arc arc, Reference arcRef1, XYZ orgin);

Spot Dimension 1.2

Spot Dimension is a sub-type of dimension, in addition to the main functions of the base class properties and Dimension, as well as some additional properties of SpotDimension, Revit provides several methods to create a marked elevation point:

Document.NewSpotElevation(View view ,Reference ref,XYZ orgin,XYZ bend,XYZ end,XYZ refPt,bool hasLeader);

Ref as a reference, orgin place for the label, bend as the inflection point, end point of the end label, refPt to be measured is denoted by point, hasLeader identifies whether arrowed

1.3 Text notes

Mainly for want view add text, files can be placed horizontally, can be tilted.

Document.NewTextNode(View pView,XYZ orgin,XYZ baseVec,XYZ upVec,double linewidth,TextAlignFlags textAlign,string strTest)

Add a text label.

  1. Detail Lines

It is a sketch view detail lines to draw, draw it as follows:

ItemFactoryBase.NewDetailCurve(View view,Curve geometryCurve);

  1. Area marker

Area created by static class:

FilledRegion.Create(Document doc,ElementId typeId,Element viewId,List<CurveLoop> boundaries)

  1. mark

You can add a new dimension to the information on the screen

Document.NewTag(View dbview,Element eleToTag,bool addHeader,TagMode tagMode,TagOrienattion tagOrienattion,XYZ pnt);

Guess you like

Origin www.cnblogs.com/minhost/p/11590754.html