IRebarUpdateServer Interface

IRebarUpdateServer Interface

Represents an interface that should be overridden to allow the generation and update of free form rebar geometry.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.3.0.0 (25.3.0.0)
Syntax
public interface IRebarUpdateServer : IExternalServer
Public Interface IRebarUpdateServer
	Inherits IExternalServer
public interface class IRebarUpdateServer : IExternalServer
type IRebarUpdateServer = 
    interface
        interface IExternalServer
    end

The IRebarUpdateServer type exposes the following members.

Methods
 NameDescription
Public methodGenerateCurves This function is supposed to calculate the bars in set based on data received in curvesData parameter.
Public methodGetCustomHandleName This function should return the name of the handle.
Public methodGetCustomHandles This function should define all handles that the Rebar has. This function is called when the Rebar is created.
Public methodGetDescription Implement this method to return a description of the server.
(Inherited from IExternalServer)
Public methodGetHandlesPosition

This function is supposed to provide the positions of handles defined in GetCustomHandles(). These positions will be shown on screen when the bar constraints are edited. If a position for a handle isn't provided, that handle will not be represented on screen while edit constraints.

This function is called when edit constraints command is lunched or during edit constraints after a constraint was changed and the curve calculation was done.

Public methodGetName Implement this method to return the name of the server.
(Inherited from IExternalServer)
Public methodGetServerId Implement this method to return the id of the server.
(Inherited from IExternalServer)
Public methodGetServiceId Implement this method to return the id of the service.
(Inherited from IExternalServer)
Public methodGetVendorId Implement this method to return the id of the vendor of the server.
(Inherited from IExternalServer)
Public methodTrimExtendCurves This function is supposed to trim or extend curves that were obtained from calling GenerateCurves(). Also in this function can be set new constraints for start and end handles.
Top
Remarks

This interface should be overridden in order to create a free form rebar with constraints and to allow generation and update of its geometry.

Once a rebar is created with a server, it will be called GetCustomHandles(RebarHandlesData) function. In the execution on this function should be defined the handles of the rebar.

Based on these handles rebar constraints can be defined. Once the constraints are defined a regeneration should be triggered in order to generate the bar geometry.

During the regeneration the functions GenerateCurves(RebarCurvesData) and TrimExtendCurves(RebarTrimExtendData) will be called. For GenerateCurves() it is supposed to calculate bars in set based on constraints. For TrimExtendCurves() it is supposed to trim or extend curves that were obtained from GenerateCurves(). Also in this function new constraints for start and end bar handles can be created. After the execution of these two functions the bar should appear on screen.

Every time when a constraint is modified a new regeneration is triggered and the functions GenerateCurves() and TrimExtendCurves() are called again.

We also can edit constraints for this rebar. When user starts to do this, the function GetHandlesPosition(RebarHandlePositionData) will be called and it is supposed to return positions of handles defined in GetCustomHandles(). This positions will be shown on screen. While editing constraints if the mouse is over a position that was specified, the function GetCustomHandleName(RebarHandleNameData) will be called in order to obtain the name of that handle.

While editing constraints an user will modify constraints (e.g. add a new reference or remove one) a regeneration will be triggered and the functions GenerateCurves() and TrimExtendCurves() will be called again.

See Also