THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/12/2007 at 08:58, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R10
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
---------
Hi,
I have a c4d document ("doc"), I'm trying to load an other c4d document ("doc2"), retrieve the first object of doc2 insert this in "doc", and then close "doc2".
the equivalent in coffee :
> _
> var doc = GetActiveDocument();
> var f = GeGetStartupPath();
> f->AddLast("plugins");
> f->AddLast("scene.c4d");
> if(GeFileExist(f,FALSE))
> {
> LoadDocument(f);
> var doc2=GetActiveDocument();
> var objet = doc2->GetFirstObject();
> var newObject=objet->GetClone(CL_NO_TRACKS);
> doc->InsertObject(newObject,NULL,NULL);
> KillDocument(doc2);
> }
>
>
> _
The file "scene.c4d" is in the plugin directory of Cinema4D folder.
I can not reproduce it in C++.
I hope somebody has the solution, thank a lot and sorry for my english,
xs_yann