Hello
How to get the list of all components in Visual Studio without create a component?
using Grasshopper;
using Grasshopper.Kernel;
using Grasshopper.Kernel.Data;
using Grasshopper.Kernel.Types;
using Grasshopper.Kernel.Special;
using System.Collections.Generic;
using System.Drawing;
namespace ComponentsList
{
public class ComponentList
{
public static IGH_Component owner ;
public static List<string> componentsList()
{
//List<PointF> pivots = new List<PointF>();
List<string> objects = new List<string>();
var doc = owner.OnPingDocument();
if (doc != null)
{
var objs = doc.Objects;
foreach (var o in objs)
{
objects.Add(o.Name.ToString());
//pivots.Add(o.Attributes.Pivot);
}
}
return objects;
}
}
}