SetShape Method (ShapeBuilder)


Sets the shape of this object to the one accumulated in the supplied Builder object. If the new shape is identical to the old one, the old shape will be kept.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 17.0.0.0 (17.0.484.0)
Since: 2016

Syntax

C#
public void SetShape(
	ShapeBuilder pBuilder
)
Visual Basic
Public Sub SetShape ( _
	pBuilder As ShapeBuilder _
)
Visual C++
public:
void SetShape(
	ShapeBuilder^ pBuilder
)

Parameters

pBuilder
Type: Autodesk.Revit.DB ShapeBuilder
A ShapeBuilder object that was used to successfully build geometry to store in this DirectShape. The built shape will be transferred to the DirectShape, and the ShapeBuilder object will be reset.

Remarks

This function will bypass extra geometry validation because the built geometry has already been validated by the ShapeBuilder. It is therefore slightly more efficient than the SetShape() routine that accepts GeometryObjects directly as input. Supplying a ViewShapeBuilder object as argument will cause the view-specific shape of this DirectShape to be updated. Supplying other ShapeBuilder types will update the model shape.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL

See Also