Searches an element by a coordinate.
GSErrCode ACAPI_Goodies ( APIAny_SearchElementByCoordID, const API_ElemSearchPars* elemSearchPars, API_Guid* foundElement );
Parameters
- elemSearchPars
- [in] Parameters of searching
- foundElement
- [out] guid of the found element
Return Values
NoError
- The function has completed with success.
APIERR_BADPARS
- searchPars is nullptr or guid is nullptr, or no element is found matching the given parameters.
APIERR_REFUSEDPAR
- The element to be searched is not a polygonal element.
For other common API errors see the API Errors document.
Remarks
This function is used to search a polygonal element by a coordinate.
Refer to the API_ElemSearchPars for the parametrization and more details.
In the GUID was moved from the third parameter to the second.
Example
API_Guid guid; API_ElemSearchPars searchPars; BNZeroMemory (&searchPars, sizeof (API_ElemSearchPars)); searchPars.type = API_MeshID; searchPars.filterBits = APIFilt_OnVisLayer | APIFilt_OnActFloor; searchPars.loc.x = 1.0; searchPars.loc.y = 3.0; searchPars.z = BiggestDouble; API_Goodies (APIAny_SearchElementByCoordID, &searchPars, &guid);
Requirements
- Version: API 4.1 or later
- Header: APIdefs_Goodies.h