if(ACAPI_database(APIDb_GetLayoutDatabasesID, &dbases, NULL) == noErr)
nDbases = BMpGetSize(reinterpret_cast<GSPtr>(dbases))/sizeof(API_DatabaseUnId);
for(Int32 ii = 0; ii < Dbases; ++ii)
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)
The problem is that drawing is bigger than layout and the drawing should fix to the right size (and also position relative to layout)
I can tell you that you need to change element.drawing.ratio but the bounds won’t change to fit the new size and you’ll have to click “update” to update the drawing’s bounds to its new size.
I am also looking for a solution for a way to change the bounds and not just the ratio.