Defines a new Solid Operation Link.
    GSErrCode  ACAPI_Element_SolidLink_Create (
        API_Guid                 guid_Target,
        API_Guid                 guid_Operator,
        API_SolidOperationID     operation,
        GSFlags                  linkFlags
    );
    
Parameters
- guid_Target  
- [in] Identifies the target element.
- guid_Operator  
- [in] Identifies the operator element.
- operation
- [in] The operation type
- linkFlags
- [in] Linking options (see ACAPI_Element_SolidLink_GetFlags)
Return Values
- NoError
- The function has completed with success.
- APIERR_NEEDSUNDOSCOPE
- The function must be undoable, it wasn’t called from an undoable command scope.
- APIERR_BADDATABASE,- APIERR_NOTMINE
- The function cannot operate on the current database.
- APIERR_BADINDEX
- One or both of the passed IDs are invalid, or the two IDs are equal.
- APIERR_BADPARS
- Invalid value passed in the operationparameter.
- APIERR_REFUSEDPAR
- Linking together of hotlinked elements is not allowed.
- APIERR_LINKEXIST
- The elements has already been linked together.
For other common API errors see the API Errors document.
Remarks
This function defines a new Solid Operation Link between two construction elements.
Example
Substract the first slab from the first wall, and the new surfaces inherit the attributes of the slab:
GSErrCode SolidLink (const API_Guid& guidTarget, const API_Guid& guid_Operator) { return ACAPI_CallUndoableCommand ("Substract Slab from Wall", [&] () -> GSErrCode { GSErrCode err = ACAPI_Element_SolidLink_Create (guid_Target, guid_Operator, APISolid_Substract, APISolidFlag_OperatorAttrib); if (err == APIERR_LINKEXIST) ACAPI_WriteReport ("Solid Link already exists between the elements", true); else if (err != NoError) ACAPI_WriteReport ("ACAPI_Element_SolidLink_Create has failed", true); return err; }); }
Requirements
- Version: API 4.2 or later
- Header: ACAPinc.h
See Also
API_SolidOperationID
ACAPI_Element_SolidLink_Remove
ACAPI_Element_SolidLink_GetTime
ACAPI_Element_SolidLink_GetOperation
ACAPI_Element_SolidLink_GetFlags
ACAPI_Element_SolidLink_GetTargets
ACAPI_Element_SolidLink_GetOperators
API Functions