Inventor: Create copy of Inventor document through API

by Vladimir Ananyev

Issue

There are many ways to create copy of Inventor documents but which one we should use and why.

Solution

We can use following 3 ways to create copy of Inventor Documents

1. Using FilesSaveAs::ExecuteSaveCopyAs() method of apprentice server API
2. Using CopyFile()  Win32 API function
3. Using CopyFileEx() Win32 API function

Among 2 and 3 which one should be used and why?

The CopyFile() is not recommended for OLE structured documents and since Inventor document is OLE structured document we shouldn’t use CopyFile() to create copy of Inventor document. There are chances that Structured storage may get corrupted.

The CopyFileEx() is specially designed for handling OLE structured documents.


Comments

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading