ElementIterator iteratore = Application.ActiveDocument.get_Elements(typeof(ReferencePoint));
            int count = 0;
            while (iteratore.MoveNext())
                int update = ++count;
                string name = update.ToString();
                Autodesk.Revit.Element elemento = iteratore.Current as Autodesk.Revit.Element;
                ReferencePoint elementoSel = elemento as ReferencePoint;
                Parameter par = elementoSel.get_Parameter("Nome");
            Document doc = Application.ActiveDocument;
            List<DataFrame> data = new List<DataFrame>();
            ElementIterator iterator = doc.get_Elements(typeof(CurveByPoints));
            while (iterator.MoveNext())
                CurveByPoints LineMod = iterator.Current as CurveByPoints;
                Line line = LineMod.GeometryCurve as Line;
                ReferencePointArray points = LineMod.GetPoints();
                string bar = LineMod.Id.Value.ToString();
                ReferencePoint point1 = points[0];
                string node1 = point1.get_Parameter("Nome").AsString();
                ReferencePoint point2 = points[1];
                string node2 = point2.get_Parameter("Nome").AsString();
                double ConvMeter = 0.3048;
                int approx = 4;
                string Lenght = (Math.Round((line.Length)*ConvMeter,approx)).ToString();
                data.Add(new DataFrame(bar,node1,Lenght,node2));   
            formConnectorData connector = new formConnectorData(data);
public class DataFrame
        string _Bar;
        string _FirstNode;
        string _Lenght;
        string _SecondNode;
        public DataFrame(string Bar, string FirstNode, string Lenght, string SecondNode)
            _Bar =Bar;
            _FirstNode = FirstNode;
            _Lenght = Lenght;
            _SecondNode = SecondNode;
        public string Bar
            get { return _Bar; }
        public string from_Node
            get { return _FirstNode; }
        public string Lenght
            get { return _Lenght; }
        public string to_Node
            get { return _SecondNode; }
public partial class formConnectorData : Form
        public formConnectorData(List<DataFrame> a)
            dataGridView1.DataSource = a;
Gruppo di lavoro:

Beam nodes

We just tested the script for a series of beams:

the script lists length of all beam segments and node coordinates upon request.

The nice aspect is that we only set up parameteres and reference planes for the first beam,
but by making copies through the CTRL holding combination, it gained properties such as the 3D
snap to points and to reference planes, so the parameters work also for the copied beams.

the aim is to cycle structural analysis and variation of dimensional parameters.


Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer