2024-09-26 10:17 AM
I want to change floor cut plan using api.
But it's not work.
API_FloorPlanCutDefinition floorPlanCutDefinition;
GSErrCode testErr = ACAPI_Environment(APIEnv_GetPreferencesID, &floorPlanCutDefinition, (void*)APIPrefs_FloorPlanCutPlaneDef);
floorPlanCutDefinition.currCutLevel += 1;
testErr = ACAPI_SetPreferences(1, sizeof(API_FloorPlanCutDefinition), &floorPlanCutDefinition);
testErr is 0. But current cut level is not changed.
Solved! Go to Solution.
2024-10-16 10:09 AM
Hi,
Please try the following code on AC27(build5030) to see whether you can change the cur level.
HTH.
GSErrCode err = NoError;
API_FloorPlanCutDefinition prefs = {};
err = ACAPI_ProjectSetting_GetPreferences( &prefs, APIPrefs_FloorPlanCutPlaneDef);
if (err == NoError) {
prefs.currCutLevel = newCutLevel;
err = ACAPI_ProjectSetting_SetPreferences( &prefs, APIPrefs_FloorPlanCutPlaneDef);
}
2024-10-16 10:09 AM
Hi,
Please try the following code on AC27(build5030) to see whether you can change the cur level.
HTH.
GSErrCode err = NoError;
API_FloorPlanCutDefinition prefs = {};
err = ACAPI_ProjectSetting_GetPreferences( &prefs, APIPrefs_FloorPlanCutPlaneDef);
if (err == NoError) {
prefs.currCutLevel = newCutLevel;
err = ACAPI_ProjectSetting_SetPreferences( &prefs, APIPrefs_FloorPlanCutPlaneDef);
}
2024-10-23 02:39 AM
Hi,
If you feel this is a good solution, please hit that “Accept as Solution” button. This helps others quickly find the answers. Thank you!