Prepares the parameter section data to save into a Library Part.
GSErrCode ACAPI_LibPart_GetSect_ParamDef ( const API_LibPart* libPart, API_AddParType** addPars, double* a, double* b, GSHandle sect2DDrawHdl, GSHandle* sectionHdl, GS::UniString* password = nullptr );
Parameters
- libPart
- [in] The library part to work on
- addPars
- [in] Additive parameters of the Library Part
- a
- [in] the value of the
A
parameter - b
- [in] the value of the
B
parameter - sect2DDrawHdl
- [in] 2D binary section data
- sectionHdl
- [out] the prepared parameter section data
- password
- [in] The (optional) password that encrypted the section.
Return Values
NoError
- The function has completed with success.
APIERR_BADPARS
- The
libPart
or thesectionHdl
parameter isnullptr
APIERR_BADID
- The function cannot work with library parts of type specified by
libPart->typeID
For other common API errors see the API Errors.
Remarks
This function is used to prepare the parameter section of the Library Part, and return the prepared section handle in sectionHdl.
The returned handle than can be supplied to the ACAPI_LibPart_AddSection or the ACAPI_LibPart_UpdateSection functions to put it into the Library Part. The a/b
and sect2DDrawHdl
parameters are exclusive, they are both used to calculate the bounding box of the symbol of the Library Part. Specifically, a
and b
should be defined only if sect2DDrawHdl
is nullptr
, otherwise their value will be calculated and returned.
Example
See the example of the ACAPI_LibPart_Create function.
Requirements
- Version: API 1.3 or later
- Header: ACAPinc.h
See Also
API_LibTypeID
API_AddParType
ACAPI_LibPart_AddSection
ACAPI_LibPart_UpdateSection
LibPart Manager
API Functions