Hello,
I have a polygon object with an Edge Selection tag associated with it that has a selection of edges. Independently browsing through the selection tag I know that it contains the edges that it should.
When I try to use SendModelingCommand to have Cinema return the spline of these selected edges it always fails with SendModelingCommand returning false.
if (op->GetDown() != nullptr)
{
PolygonObject *poly = (PolygonObject*)op->GetDown();
if (poly == nullptr)
return nullptr;
PolygonObject *clonePoly = (PolygonObject*)poly->GetClone(COPYFLAGS::NONE, nullptr);
if (clonePoly == nullptr)
return FALSE;
if (neighbor.Init(clonePoly->GetPointCount(), polyArray, clonePoly->GetPolygonCount(), nullptr))
{
clonePoly->SetSelectedEdges(&neighbor, edgeselectionTag, EDGESELECTIONTYPE::SELECTION);
AutoAlloc<BaseDocument> tempDoc;
ModelingCommandData cd;
BaseContainer bc = BaseContainer();
cd.doc = tempDoc;
cd.bc = &bc;
cd.op = clonePoly;
if (!SendModelingCommand(ID_MODELING_EDGE_SPLINE_COMMAND, cd))
{
return FALSE;
}
}
}
I looked through some forums posts and through the sdk and I don't understand why the SendModelingCommand is always returning false.
Any help would be greatly appreciated.
John Thomas