Hi all,
I'm trying to adjust the layout of the rebar set (width and length).
Q1) I have tried to adjust the width through ArrayLength property (See below code) but nothing happend.
Q2) How Can I adjust the length also?
string prombtMessage = "Pick Rebar Set"; Reference setRef = selection.PickObject(ObjectType.Element, prombtMessage); Element element = doc.GetElement(setRef); Rebar rebar = (Rebar)element; rebar.ArrayLength = rebar.ArrayLength / 2;
P.S: I can do this as a Revit end-user by the sliders of the rebar set.
Thanks in advance.
Hi all,
I'm trying to adjust the layout of the rebar set (width and length).
Q1) I have tried to adjust the width through ArrayLength property (See below code) but nothing happend.
Q2) How Can I adjust the length also?
string prombtMessage = "Pick Rebar Set"; Reference setRef = selection.PickObject(ObjectType.Element, prombtMessage); Element element = doc.GetElement(setRef); Rebar rebar = (Rebar)element; rebar.ArrayLength = rebar.ArrayLength / 2;
P.S: I can do this as a Revit end-user by the sliders of the rebar set.
Thanks in advance.
I have modified the length through the below parameter
rebar.get_Parameter(BuiltInParameter.REBAR_ELEM_LENGTH).Set(maxRebarLength);
but I still can't set property ArrayLength !
I have modified the length through the below parameter
rebar.get_Parameter(BuiltInParameter.REBAR_ELEM_LENGTH).Set(maxRebarLength);
but I still can't set property ArrayLength !
You have to set the layout Rule, the array length is included there.
Rebar.SetLayoutAsMaximumSpacing(...), Rebar.SetLayoutAsFixedNumber(...), etc.
You have to set the layout Rule, the array length is included there.
Rebar.SetLayoutAsMaximumSpacing(...), Rebar.SetLayoutAsFixedNumber(...), etc.
Can't find what you're looking for? Ask the community or share your knowledge.