Hi,
Does anybody know how to get drawings from layout and how to change drawings size?
Here's my code:
API_DatabaseUnId *dbases = NULL;
API_DatabaseInfo dbLayoutBook;
OSErr err;
Int32 nDbases = 0;
if(ACAPI_database(APIDb_GetLayoutDatabasesID, &dbases, NULL) == noErr)
{
nDbases = BMpGetSize(reinterpret_cast<GSPtr>(dbases))/sizeof(API_DatabaseUnId);
for(Int32 ii = 0; ii < Dbases; ++ii)
{
BnZeroMemory(&dbLayoutBook, sizeof(API_DatabaseInfo));
dbLayoutBook.typeID = APIWind_LayoutID;
dbLayoutBook.databaseUnId = dbases[ii];
if(ACAPI_Database(APIDb_ChangeCurrentDatabaseID, &dbLayoutBook, NULL) == noErr)
// FIRST PART: NOW HOW TO GET DRAWINGS THAT BELONGS THIS LAYOUT?
// SECOND PART: HOW TO CHANGE IT'S DRAWING(S) (Layout is now in 'hand' (dbases), includind it's size etc.). I mean drawing's size and origo should now set to fit in layout
??
}
}
if(dbases != NULL)
BMpFree(reinterpret_cast<GSPtr>(dbases));
}
The problem is that drawing is bigger than layout and the drawing should fix to the right size (and also position relative to layout)
What I miss now??
BR
Ari