Message 1 of 6
Combine multible Modellines

Not applicable
04-10-2019
12:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
i am new to Revit API programming and was wondering if there is a possibility to combine multible modellines.
Via uiApp.ActiveUIDocument.Selection i have the option to pick modellines and get access to the geometry of each element (with LocationCurve) as shown below:
var pickedRefs = selLine.PickObjects(ObjectType.Element, new ModellineFilter(), "Pick Modellines."); foreach (var refer in pickedRefs) { var elementCurve = doc.GetElement(refer); var locationCurve = elementCurve.Location as LocationCurve; Curve curve = locationCurve.Curve;
// ? }
Now i want to combine those curves to one single curve element, so that i can access the complete geometry and be able to use curve methods like curve.length. It should also be possible to set referencepoints according to the entire curve via PointLocationOnCurve.
I hope there is an opportunity to realize this kind of conversion via the Revit-API.