2024 Class
Changes 0
C

ViewShapeBuilder

Description:
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.
Remarks:
The validation functionality is used by DirectShape to validate the incoming shape.
Inheritance Hierarchy:
System.Object
  Autodesk.Revit.DB.ShapeBuilder
    Autodesk.Revit.DB.ViewShapeBuilder
Name Return Type Description Inherited From
C ViewShapeBuilder() None Default constructor for an ViewShapeBuilder object.
C ViewShapeBuilder(DirectShapeTargetViewType) None 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.
Name Return Type Description Inherited From
M AddCurve(Curve) None Add a curve to the GRep associated to this ViewShapeBuilder.
M Reset() None Clears the accumulated geometry and resets other ViewShapeBuilder parameters to invalid values.
M ValidateCurve(Curve) bool 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.
M ValidateCurve(Curve, DirectShapeTargetViewType) bool 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
M ValidateShape(IList<GeometryObject>, DirectShapeTargetViewType) bool 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.
M ValidateViewType(DirectShapeTargetViewType) bool Validates the incoming view type. As of today, the only allowed view type is Plan.
M Dispose() None Releases all resources used by the ShapeBuilder
Name Return Type Description Inherited From
P ViewNormal XYZ 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.
P ViewType DirectShapeTargetViewType View type where the view-specific shape currently being built will be used
P IsValidObject bool Specifies whether the .NET object represents a valid Revit entity. ShapeBuilder