THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/12/2006 at 04:05, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.6
Platform:
Language(s) : C.O.F.F.E.E ;
---------
Hello!
I've got a question:
I've got the following code:
var file = new(Filename);
file=GeGetRootFilename();
file->RemoveLast();
file->AddLast("objekt.c4d");
LoadDocument(file);
var currentObject = GetActiveObject(doc);
var clone;
clone=currentObject->GetClone(CL_NO_HIERARCHY);
var actdoc=GetActiveDocument();
actdoc->InsertObject(clone,NULL,NULL);
//KillDocument();
EventAdd(DOCUMENT_CHANGED);
I would like to load "objekt.c4d" into my actual scene.
But in this case cinema opens a new scene called "objekt.c4d". That's not what I want. Cinema should insert the object from "objekt.c4d" to my actual scene, and not open a new one.
Shouldn't it work with "KillDocument();". I cannot find the function in SDK 9.5.
Could anybody helf me?
Thanks a lot!