On 16/07/2014 at 05:58, xxxxxxxx wrote:
Thank you, I really apreciate your answers.
It is too much code to look at... this is the simplified version of the code
void MyClass::FreezeAllTransforms(BaseObject* pFirstObject)
BaseObject* pObject = pFirstObject;
while (pObject != nullptr)
{
const String& objectName = pObject->GetName();
pObject->SetBit(BIT_ACTIVE);
CallCommand(1011982);
pObject->DelBit(BIT_ACTIVE);
FreezeAllTransforms(pObject->GetDown());
pObject = pObject->GetNext();
}
}
The code is executing right but does not do anything.
Are you trying to center the axis of objects in the current scene(document)?
Or are you trying to center the axis of objects in a different document than the currently active document?
Maybe both?
I'm trying to center the axis of objects in a clone of the active document, so it is not the active document.
The code you posted should work if you're selecting the objects and documents properly.
Ok, maybe I'm not selecting the document properly, what do you mean with select the document. (I will search into the documentation for it)
Have you tested that you're actually selecting the objects with something like GePrint(obj->GetName()); or something similar?
Yes, I have tested and is executing right, but have no effect.
Thank you.