2015-10-08
08:35 AM
- last edited on
2023-07-13
03:20 PM
by
Doreena Deng
IO::Location fileLoc ("C:\\temp\\MyLibpart.gsm");
API_LibPart libPart;
GSErrCode err;
BNZeroMemory (&libPart, sizeof (API_LibPart));
libPart.typeID = APILib_ObjectID;
libPart.location = &fileLoc;
err = ACAPI_LibPart_Register (&libPart);
2015-10-12 01:50 PM
Rinovo wrote:I agree that this is a misleading error. The problem is that you are trying to register a library part which is not in the embedded library.IO::Location fileLoc ("C:\\temp\\MyLibpart.gsm"); API_LibPart libPart; GSErrCode err; BNZeroMemory (&libPart, sizeof (API_LibPart)); libPart.typeID = APILib_ObjectID; libPart.location = &fileLoc; err = ACAPI_LibPart_Register (&libPart);
Any ideas why i'm getting MEMFULL error ?
2015-10-13 08:45 AM
2015-10-14 01:54 PM
Rinovo wrote:Yeah, you can create one directly in the embedded library:
Thanks Akos!
I was trying to add library part to embedded library.
I guess only way would be to make new one through creating new one.
IO::Location file;
GS::UniString str;
GetIndString (str, 32552, 1); // default name
ACAPI_Interface (APIIo_GetLastValidEmbeddedLPNameID, &str, &file);
// Save As dialog
bool bff = false;
bool retIsOk;
ACAPI_Interface (APIIo_SaveLibPartFileDialogID, &retIsOk, &file, &bff, &str);
if (retIsOk) {
// Create the libpart
API_LibPart libPart;
CreateLibpart (libPart, file);
}
You can skip the save dialog, just use the location from the APIIo_GetLastValidEmbeddedLPNameID call (but don't forget to replace the last local name).