2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations
2017-09-16
07:21 PM
- last edited on
2022-12-06
02:01 PM
by
Daniel Kassai
2017-09-17 10:12 AM
IO::Location rab("C:/GDLTest/11204.gsm"); GSErrCode err; auto folderId = API_SpecFolderID::API_EmbeddedProjectLibraryFolderID; IO::Location embeddedLibraryFolder; if (ACAPI_Environment(APIEnv_GetSpecFolderID, &folderId, &embeddedLibraryFolder) == NoError && IO::Folder(embeddedLibraryFolder).GetStatus() == NoError) { // copy file to embedded folder IO::Location destFolder = embeddedLibraryFolder; destFolder.AppendToLocal(IO::Name("11204.gsm")); err = IO::fileSystem.Copy(rab, destFolder); API_LibPart libPart; BNZeroMemory(&libPart, sizeof(API_LibPart)); libPart.typeID = APILib_ObjectID; libPart.location = &destFolder; err = ACAPI_LibPart_Register(&libPart); }
2017-09-18 08:54 AM
vuego wrote:Alternatively, you can create a new library part (ACAPI_LibPart_Create), that puts it directly into the embedded library. Also, you can assemble the library part with ACAPI_LibPart_AddSection or ACAPI_LibPart_NewSection calls.
Found a solution:
...