- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
HI COM,
In this code i want to subtract to solid a solid clone.
//open main entity
if(acdbOpenObject(entMain,idMainAcDb::kForWrite)==Acad::eOk)
{
AcDb3dSolid *myMainSolid=AcDb3dSolid::cast(entMain);
//open tool entity
if(acdbOpenObject(entTool,idTool,AcDb::kForWrite)==Acad::eOk)
{
//clone tool entity
AcDb3dSolid *myCloneSolid=AcDb3dSolid::cast(entTool->clone());
entTool ->close(); //close tool entity
es= myMainSolid->booleanOper(AcDb::kBoolSubtract, myCloneSolid);
myCloneSolid->close();
delete myCloneSolid;
myCloneSolid=NULL;
}
entMain->close();
}
I have two objectS in the model space and i open each in the write mode.
The first object is the main solid, the second is the "tool" solid.
I clone the tool solid and in this way the boolean operation doesn’t work.
The error code is ‘eWasOpendedForWrite’ but the tool entity is been closed before the operation.
If I add the solid clone to model space and re-open the Id, the operation works. is it right? why?
Regards,
Bruno
Solved! Go to Solution.

