THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/02/2004 at 18:35, xxxxxxxx wrote:
Thanks for the reply,
I have tried it.
Now I have one Object:
BaseObject *ObjGrid = BaseObject::Alloc(Oplane);
BaseContainer *conGrid = ObjGrid- >GetDataInstance();
then I have set the height and width for the container
_ conGrid->SetReal(PRIM_PLANE_SUBW, XNos);
conGrid->SetReal(PRIM_PLANE_SUBH, ZNos);_
_ conGrid->SetReal(PRIM_PLANE_WIDTH, (XNos*XWidth));_ _
conGrid->SetReal(PRIM_PLANE_HEIGHT, (ZNos*ZWidth));_
_ ObjGrid->SetName(vGridName);_
_ doc->InsertObject(ObjGrid,NULL,NULL,TRUE); _
Until now i am able to create the object
When i wanna make it editable by using sendmodelingcommand, as follows
_ doc->StartUndo();
doc->AddUndo(UNDO_NEW, ObjGrid);
ObjGrid->SetRot(Vector(Rot_H, Rot_P, Rot_B));
ModelingCommandData cd;
cd.doc = doc;
cd.bc = conGrid;
cd.op = ObjGrid;
cd.mode = MODIFY_ALL;
if (!SendModelingCommand(MCOMMAND_MAKEEDITABLE, cd)) return FALSE;_
but this code does not produce a plane anymore. Do u have any idea about this?
Thanks and Best regards