How can I edit List<Curve> of Rebar same as tool "edit sketch rebar"

How can I edit List<Curve> of Rebar same as tool "edit sketch rebar"

Anonymous
Not applicable
1,111 Views
3 Replies
Message 1 of 4

How can I edit List<Curve> of Rebar same as tool "edit sketch rebar"

Anonymous
Not applicable

I 'm coding some addin to trim rebar , extent rebar and split rebar.

Problem: I can't find a function in SDK Revit 2017 and SDK revit 2018, to edit/ set List<Curve> of Rebar same as tool "Edit sketch" (path: Modify|Structural Rebar/Mode/Edit sketch)

 

now, My solution is not good, first, i get Ilist <Curve> of Rebar by 2 function ,

in revit 2017:

rebar.ComputeDrivingCurves();
rebar.GetCenterlineCurves();

in revit 2018:

rebar.GetShapeDrivenAccessor().ComputeDrivingCurves();

 

I create new List<Curve>, then I create new rebar,finally I delete old rebar = > Problem: Dimension and tags of old rebar will be deleted

1,112 Views
3 Replies
Replies (3)
Message 2 of 4

jamess166
Advocate
Advocate
I also want to know how to do that, you found the solution.
0 Likes
Message 3 of 4

Anonymous
Not applicable

Same problem here, have any of you found more elegant solution than deleting and recreating rebar?

@Anonymous 

@jamess166 

0 Likes
Message 4 of 4

Anonymous
Not applicable

If you are creating a free form rebar, you can simply call SetCurves() method.

0 Likes