Get all properties of object

Hi, I have a problem with retrieving the exact property of objects by GET PROPERTY component. It returns just 1 value but not a list.

Is there any way to get all properties of the selected object and sorting ASCENDANT or DESCENDANT, as the Tekla template does

Since you input is a Tapered Rebar Group you need to deconstruct/explode that and I don’t think you can do that with the GH link. @sebastian.lindholm it would be nice if the Get Children component worked here (feature request), but I suspect that they are not available as Children in API?

I use this approach, not sure it is the best way but it works.


using System;

using System.Linq;

using System.Collections;

using System.Collections.Generic;

using System.Drawing;




using Rhino;

using Rhino.Geometry;




using Grasshopper;

using Grasshopper.Kernel;

using Grasshopper.Kernel.Data;

using Grasshopper.Kernel.Types;




public class Script_Instance : GH_ScriptInstance

{

    private void RunScript(object x, ref object a)

    {

        if (x == null) { a = null; return; }




        var lengths = new List<double>();




        try

        {

            foreach (var bar in ((dynamic)x).GetRebarGeometries(false))

            {

                var pl = new Rhino.Geometry.Polyline();




                foreach (var p in bar.Shape.Points)

                    pl.Add(new Point3d(p.X, p.Y, p.Z));




                lengths.Add(pl.Length);

            }

        }

        catch

        {

            Print("Tekla might not be running or was launched after Grasshopper.");

            return;

        }




        a = lengths;

    }

}

It’s not only for rebar group length attribute, it would be great for all properties, something like listing MAX_Z of beams which have has the same name

Use my logic in the code and extract all the other attributes as you need.

Alternatively, there is the EleFont plugin for GH that easily allows to extract and set object properties (I used it in one of my projects to create a bunch of pieces for a model with each piece having its own id code)

These are Tekla objects not Rhino Objects