Returns the preferences data.
GSErrCode ACAPI_Environment ( APIEnv_GetPreferencesID, ...* prefs, API_PrefsTypeID prefsTypeID );
Parameters
- prefs
- [out] Data of a preferences tab page. The type depends on the
prefsType
parameter. - prefsTypeID
- [in] The type of the preferences you want to get.
Return Values
NoError
API_WorkingUnitPrefs
- The function has completed with success.
APIERR_BADPARS
prefs
isnullptr
APIERR_BADID
prefsTypeID
is invalid.APIERR_NOPLAN
- No open project.
APIERR_MEMFULL
- Low memory condition.
For other common API errors see the API Errors document.
Remarks
Many switches and values are returned which can be set in the different tab pages of the Project Preferences dialog and the Work Environment settings.
Usable structures of preference types (for par1
) are:
- API_WorkingUnitPrefs
- API_RefLevelsPrefs
- API_DimensionPrefs
- API_CalcUnitPrefs
- API_CalcRulesPrefs
- API_LegacyPrefs
- API_ZonePrefs
- API_SafetyPrefs
- API_ImagingAndCalcPrefs
- API_FloorPlanCutDefinition
- API_LayoutsPrefs
Note: the prefsType
should be passed as a value instead of a pointer. See the example.
Example
API_WorkingUnitPrefs unitPrefs; ACAPI_Environment (APIEnv_GetPreferencesID, &unitPrefs, (void *) APIPrefs_WorkingUnitsID);
See also the Environment_Control example project.
Requirements
- Version: API 2.1 or later
- Header: APIdefs_Environment.h
See Also
API_PrefsTypeID
API_WorkingUnitPrefs, API_RefLevelsPrefs, API_DimensionPrefs
API_CalcUnitPrefs, API_CalcRulesPrefs, API_LegacyPrefs, API_ZonePrefs
API_SafetyPrefs, API_ImagingAndCalcPrefs
API_FloorPlanCutDefinition, API_LayoutsPrefs
ACAPI_Environment, API Functions