Can we add Rebar Constraints to a particular Handle?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am trying to place rebars as shown in attached Image where I need to modify Constraints for Handle name "Bar Segment 2" so that Rebars are placed properly.
But while doing that Constraints for Handle name "Bar Segment 2" are null and I am not able to add Constraints and not able to modify.
Below Methods I have tried for modification or creation of Constraints.
oRebar.GetRebarConstraintsManager().GetPreferredConstraintOnHandle(handle).ReplaceReferenceTargets(handle, oRef, true, 0.0);
IList<RebarConstraint> rebConstraint= oRebar.GetRebarConstraintsManager().GetConstraintCandidatesForHandle(handle, selectTopRef);
IList<RebarConstraint> rebarConstraints = oRebar.GetRebarConstraintsManager().GetConstraintCandidatesForHandle(handle);
bool oRes = oRebar.GetRebarConstraintsManager().AllowConstraintTargets(handle, oRef);
bool resApply = oRebar.GetRebarConstraintsManager().ApplyRebarConstraints(rebConstraint, oRef, oRef);
oRebar.GetRebarConstraintsManager().SetPreferredConstraintForHandle(handle, RebarConstraint.Create(handle, oRef, false, 0.0));
Please let me know if I missing something or following wrong methods.
Here Rebars are Shape Driven Rebars.
Thank you,
Akshay Shinde