IRebar |
Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.3.0.0 (25.3.0.0)
The IRebarUpdateServer type exposes the following members.

Name | Description | |
---|---|---|
![]() | GenerateCurves | This function is supposed to calculate the bars in set based on data received in curvesData parameter. |
![]() | GetCustomHandleName | This function should return the name of the handle. |
![]() | GetCustomHandles | This function should define all handles that the Rebar has. This function is called when the Rebar is created. |
![]() | GetDescription |
Implement this method to return a description of the server.
(Inherited from IExternalServer) |
![]() | GetHandlesPosition | 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. |
![]() | GetName |
Implement this method to return the name of the server.
(Inherited from IExternalServer) |
![]() | GetServerId |
Implement this method to return the id of the server.
(Inherited from IExternalServer) |
![]() | GetServiceId |
Implement this method to return the id of the service.
(Inherited from IExternalServer) |
![]() | GetVendorId |
Implement this method to return the id of the vendor of the server.
(Inherited from IExternalServer) |
![]() | TrimExtendCurves | 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. |

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.