Dear Christian,
Thank you for the pertinent warning.
Of course, the method was only introduced with Revit 2017.
I copied the two methods into The Building Coder samples:
Is the following description correct?
- Retrieve the extrusion defined by the curves of interest.
- Temporarily delete it to obtain and store the model curve element ids.
- Iterate over the deleted curve elements.
- Retrieve the profile model lines and toggle their tangency lock if their neighbouring elements are arcs.
- Identify the two arcs based on their radius.
The initial code relies on the sketch line element ids being in the order of loop traversal, which is only true when they are created in order.
The second version uses the CurveElement.GetAdjoinedCurveElements method instead and is therefore more robust.
I don't see any use at all being made of mArcsR1, mArcsR2 or mLines.
By the way, the last if statement in your new code uses bitwise & where you probably intended to use Boolean &&.
Cheers,
Jeremy