ViewShapeBuilder Class

Builds and verifies a view-specific shape representation that would typically be stored in a DirectShape object. Currently limited to curve-based representations for plan and elevation views.
Inheritance Hierarchy
SystemObject
  Autodesk.Revit.DBShapeBuilder
    Autodesk.Revit.DBViewShapeBuilder

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class ViewShapeBuilder : ShapeBuilder

The ViewShapeBuilder type exposes the following members.

Constructors
 NameDescription
Public methodViewShapeBuilder Default constructor for an ViewShapeBuilder object.
Public methodViewShapeBuilder(DirectShapeTargetViewType) A constructor for an ViewShapeBuilder object that takes a view type. It will infer the view normal from view type. View normal and view type are used to validate the geometry to be stored as a view-specific shape representation of a DirectShape object.
Top
Properties
 NameDescription
Public propertyIsValidObject Specifies whether the .NET object represents a valid Revit entity.
(Inherited from ShapeBuilder)
Public propertyViewNormal Normal of the view that will display the shape being built. Must be set explicitly before adding any geometry. Must be a unit vector. This is used to validate incoming geometry - it must be orthogonal to the viewNormal.
Public propertyViewType View type where the view-specific shape currently being built will be used
Top
Methods
 NameDescription
Public methodAddCurve Add a curve to the GRep associated to this ViewShapeBuilder.
Public methodDispose
(Inherited from ShapeBuilder)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodReset Clears the accumulated geometry and resets other ViewShapeBuilder parameters to invalid values.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodValidateCurve(Curve) Validates curve to be added to the view-specific shape being constructed. Called by AddCurve() to validate input. Expects a valid view normal to be set prior to the call.
Public methodStatic memberValidateCurve(Curve, DirectShapeTargetViewType) Validates curve to be added to the view-specific shape being constructed. Called by AddCurve() to validate input. This function may be used to pre-validate the geometry being added to avoid AddCurve() throwing an InvalidArgumentException
Public methodStatic memberValidateShape Validates a shape represented as a collection of geometry objects for use as a view-specific shape. The objects are expected to be either points, curves or polylines. Curves are expected to be flat and lie in a plane perpendicular to view normal as defined by view type.
Public methodStatic memberValidateViewType Validates the incoming view type. As of today, the only allowed view type is Plan.
Top
Remarks
The validation functionality is used by DirectShape to validate the incoming shape.
See Also