Setting General Inputs via function

Hello All,

I am trying to use a function to create a series of spheres which I have been able to complete.  My questions is how do I get the "for loop" to change the Level Name of each sphere, what is the best way to change a objects colour/level etc each time it is created?

Cheers,

Alex

PS, if anyone has a good way to add an "Asset Tag" to a GC custom object I would be really keen to know how.

Parents
  • Hi Alex

    For the colour part, see attached. There are 2 methods in here. One with a loop and one using Operation Nodes. I haven't got to the levels, maybe someone will do before me. 

    For Asset ID, one of the properties of the node will be Catalog Item, you can select one from here or create your own. One of the properties will be ID. 

    function (CoordinateSystem CS)
    {

    for (int i = 0; i < point03.Count; ++i)
    {
    Solid so = new Solid(this);
    so.SphereByCentroidRadius(point03[i], 1.5);
    so.Color = i;

    }
    }

     Color by count.dgn

    Stuart


    This is a test

Reply
  • Hi Alex

    For the colour part, see attached. There are 2 methods in here. One with a loop and one using Operation Nodes. I haven't got to the levels, maybe someone will do before me. 

    For Asset ID, one of the properties of the node will be Catalog Item, you can select one from here or create your own. One of the properties will be ID. 

    function (CoordinateSystem CS)
    {

    for (int i = 0; i < point03.Count; ++i)
    {
    Solid so = new Solid(this);
    so.SphereByCentroidRadius(point03[i], 1.5);
    so.Color = i;

    }
    }

     Color by count.dgn

    Stuart


    This is a test

Children