Grid lines coordinates
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2021-08-05
05:32 AM
- last edited on
2021-09-14
09:23 AM
by
Noemi Balogh
2021-08-05
05:32 AM
Hello all,
My goal is to get the coordinates of each grid line, preferably in 3D coordinates. Here is the code I am currently using, but the callback never comes, no error is returned. Perhaps someone knows what is wrong here:
GSErrCode __ACENV_CALL CustomNumberingGridLineProc(API_NumberingGridLine *gridLine)
{
return NoError;
} // CustomNumberingGridLineProc
void ExportGrids()
{
GS::Array<API_DatabaseUnId> dbases;
API_DatabaseUnId databaseUnIds;
API_WindowInfo windowInfo;
GSErrCode err = ACAPI_Database(APIDb_GetLayoutDatabasesID, &databaseUnIds, &dbases);
if (err == NoError) {
for (const auto& dbUnId : dbases) {
API_DatabaseInfo dbPars = {};
dbPars.databaseUnId = dbUnId;
err = ACAPI_Database(APIDb_GetDatabaseInfoID, &dbPars, nullptr);
if (err == NoError) {
err = ACAPI_Database(APIDb_ChangeCurrentDatabaseID, &dbPars);
err = ACAPI_Environment(APIEnv_GetNumberingGridLinesID, CustomNumberingGridLineProc);
}
}
}
}
My goal is to get the coordinates of each grid line, preferably in 3D coordinates. Here is the code I am currently using, but the callback never comes, no error is returned. Perhaps someone knows what is wrong here:
GSErrCode __ACENV_CALL CustomNumberingGridLineProc(API_NumberingGridLine *gridLine)
{
return NoError;
} // CustomNumberingGridLineProc
void ExportGrids()
{
GS::Array<API_DatabaseUnId> dbases;
API_DatabaseUnId databaseUnIds;
API_WindowInfo windowInfo;
GSErrCode err = ACAPI_Database(APIDb_GetLayoutDatabasesID, &databaseUnIds, &dbases);
if (err == NoError) {
for (const auto& dbUnId : dbases) {
API_DatabaseInfo dbPars = {};
dbPars.databaseUnId = dbUnId;
err = ACAPI_Database(APIDb_GetDatabaseInfoID, &dbPars, nullptr);
if (err == NoError) {
err = ACAPI_Database(APIDb_ChangeCurrentDatabaseID, &dbPars);
err = ACAPI_Environment(APIEnv_GetNumberingGridLinesID, CustomNumberingGridLineProc);
}
}
}
}
Labels:
- Labels:
-
Add-On (C++)
0 REPLIES 0