On 06/05/2013 at 19:31, xxxxxxxx wrote:
This is how to change the some of the various options on a cube primitive:
BaseDocument *doc = GetActiveDocument();
BaseObject *op = BaseObject::Alloc(Ocube);
op->SetName("My Cube");
op->SetParameter(DescID(PRIM_CUBE_LEN), GeData(Vector(100,50,200)), DESCFLAGS_SET_0); //Sets the X, Y, Z values for the cube's size
op->SetParameter(DescID(PRIM_CUBE_SUBX), GeData(2), DESCFLAGS_SET_0); // number of segments is 2
op->SetParameter(DescID(PRIM_CUBE_SUBY), GeData(5), DESCFLAGS_SET_0); // number of segments is 5
op->SetParameter(DescID(PRIM_CUBE_SUBZ), GeData(3), DESCFLAGS_SET_0); // number of segments is 3
doc->InsertObject(op, NULL, NULL);
For other options. Drag them from the AM into the bottom of the Console window to get their ID's. Then plugin them into a SetParameter() function in the same manner.
The other primitives work the same way.
-ScottA