ACAPI_​Goodies

Functions for various purposes.

    GSErrCode  ACAPI_Goodies (
        API_GoodiesID     code,
        void*             par1 = nullptr,
        void*             par2 = nullptr,
        void*             par3 = nullptr,
        void*             par4 = nullptr
    );

 

Parameters

code
[in] Goodie function identifier.
par1
[in/out] The parameter depends on the code parameter.
par2
[in/out] The parameter depends on the code parameter.
par3
[in/out] The parameter depends on the code parameter.
par4
[in/out] The parameter depends on the code parameter.

 

Return Values

NoError
The goodie function completed with success.
APIERR_BADID
Invalid code parameter was passed.

More return values can be found at the description of each goodie functions.

 

Remarks

This function collects several kind of functions.

API_GoodiesID

Description

 

 

General functions

 

APIAny_UsableGDLStringID

Determines whether the string is a GDL keyword or reserved symbol.

APIAny_CalcSunOnPlaceID

Calculates the sun position in a given place.

APIAny_SearchElementByCoordID

Searches an element by a coordinate.

APIAny_ConvertPictureID

Converts a picture into another image format.

APIAny_ConvertMimePictureID  5.1

Converts a picture into another image format using MIME types.

APIAny_GetTextSizeFactorID  5.1

Returns the ratio of the font capital size and typography size.

APIAny_GetMainGroupGuidID  12

Returns the Guid of the top level group of a nested group element.

APIAny_GetContainingHotlinkGuidID  12

Retrieves the hotlink element which contains the given element.

APIAny_RunGDLParScriptID  12

Run the element’s GDL parameter script.

APIAny_GetCWAbsoluteBottomID  12

Retrieves the the base height of a curtain wall or its subelem.

APIAny_GetCWHeightID  12

Retrieves the height of a curtain wall element.

APIAny_GetCWSubElemParamsID  12

Returns the calculated additional parameters of a curtain wall subelem.

APIAny_GetSkylightHolePolygonID  Featuring API 15

Returns the polygon data of a Skylight hole contour.

APIAny_Elem2UIPriorityID  17

Returns user interface priority for a building material connection priority.

APIAny_UI2ElemPriorityID  17

Returns the building material connection priority for a priority set on the user interface.

APIAny_CalcSideOffsetToCoreOffsetID  17

Converts the reveal depth offset from wall side to core skin for wall openings.

APIAny_CalcCoreOffsetToSideOffsetID  17

Converts the reveal depth offset from core skin to wall side for wall openings.

APIAny_GetHierarchicalElementOwnerID 23

Returns the owner of the child elem in hierarchical elem.

APIAny_GetHttpConnectionPortID 25

Returns the HTTP port number, on which Archicad is expecting requests.

APIAny_ActivateSessionReportID 26

Activates the session report window.

 

 

Work on Parameter Lists

 

APIAny_OpenParametersID

Opens a Library Part parameter list to edit.

APIAny_GetParamValuesID

Returns the possible values defined for a Library Part parameter.

APIAny_ChangeAParameterID

Changes a value in an opened Library Part parameter list.

APIAny_GetActParametersID

Returns the actual (edited) values of a Library Part parameter list opened to edit.

APIAny_CloseParametersID

Closes the Library Part parameter list opened to edit.

 

 

Work on Polygons

 

APIAny_InsertPolyNodeID

Inserts a node into a polygon.

APIAny_DeletePolyNodeID

Deletes a node from a polygon.

APIAny_InsertSubPolyID

Inserts a whole subpolygon (hole) into a polygon.

APIAny_DeleteSubPolyID

Deletes a whole subpolygon (hole) from a polygon.

APIAny_RegularizePolygonID

Regularizes a polygon.

APIAny_RegularizePolylineID

Regularizes a polyline.

APIAny_DisposeRegularizedPolyID

Deallocates an API_RegularizedPoly structure.

APIAny_TriangulatePolyID

Decomposes a polygon into triangles.

 

 

Work on Neigs

 

APIAny_GetSelectedElementID 21

Return the element’s GUID from the neig information, taking sub-elements into account.

APIAny_SetSelectedElementNeigID 21

Converts an element GUID to the appropriate neig, taking sub-elements into account.

APIAny_NeigIDToElemTypeID

Returns the element type assigned to a neig.

 

 

Spline calculation

 

APIAny_GetSplineMaxDistID

Returns the distance of a point and a bezier (available from 6.5 R2/v2).

 

 

PolygonId Conversion

 

APIAny_PolygonId2SurfaceTypeID 20

Returns the surfaceType for the given polygonId.

 

 

Inter-addon communication

 

APIAny_InitMDCLParameterListID

Initializes a parameter list to pass to an other add-on.

APIAny_GetMDCLParameterNumID

Retrieves the number of the parameters on the parameter list.

APIAny_GetMDCLParameterID

Retrieves a parameter from the parameter list.

APIAny_AddMDCLParameterID

Appends a parameter to the parameter list.

APIAny_ChangeMDCLParameterID

Modifies a parameter on the parameter list.

APIAny_FreeMDCLParameterListID

Frees the parameter list handle.

 

 

Text line length measurement

 

APIAny_GetTextLineLengthID

Returns the length of a given text line.

 

 

Texture coordinates

 

APIAny_GetTextureCoordID

Returns the texture coordinate system of a given point of a given polygon on a given body.

 

 

Library part unique ID functions

 

APIAny_GetBuiltInLibpartUnIdID

Gets the GUID of a built in library part.

APIAny_CheckLibPartSubtypeOfID

Checks whether a library part unique ID refers to a subtype of another.

APIAny_CompareLibPartUniqueIdsID

Compares two library part unique IDs.

APIAny_GetElemCreatorToolUnIdID

Returns the unique ID of the creator tool of the specified object.

APIAny_SetEmptyHoleUnIdID

Sets the unique ID of the empty hole.

APIAny_GetElemLibPartUnIdID  12

Returns the library part unique identifier of the GDL based element.

APIAny_GetLibPartToolVariationID  15

Returns the library part’s creator element type and variation ID.

APIAny_CheckLibPartSubtypeOfbyMainID  12

Checks whether a library part unique ID refers to a subtype of another.

 

 

Text element manipulation

 

APIAny_ChangeContentID  6.1

Changes the content of a text or a textual label element.

 

 

Autotext manipulation  10

 

APIAny_GetAutoTextFlagID

Returns the mode flag currently set for autotext replacing in retrieved texts.

APIAny_ChangeAutoTextFlagID

Switches autotexts to be replaced with their current values or kept as autotext keys in retrieved texts.

APIAny_GetPropertyAutoTextKeyTableID 21

Retrieves all possible context dependent autotext names and their corresponding keys.

APIAny_InterpretAutoTextID 21

Retrieves the autotext value for a context dependent autotext key.

APIAny_GetAutoTextKeysID

Retrieves all autotext keys and their values.

APIAny_GetAutoTextsID

Retrieves the key, description and value of the currently available autotexts.

APIAny_SetAnAutoTextID

Sets the value of an autotext.

APIAny_CreateAnAutoTextID  12

Creates a new entry in the Project Info.

APIAny_DeleteAnAutoTextID  12

Deletes a custom entry in the Project Info.

 

 

Visual Override helpers

 

APIAny_EnableVisualOverrideID  20

Enables graphical overrides during ACAPI_Element_ShapePrims.

 

 

Renovation helpers  15

 

APIAny_EnableRenovationOverrideID

Enables renovation graphical overrides during ACAPI_Element_ShapePrims.

APIAny_GetRenovationFilterNameID

Returns the name of the given renovation filter.

APIAny_GetRenovationStatusNameID

Returns the name of the given renovation status.

 

 

IFC helpers  18

 

APIAny_ElemHasVisibleSkinID  18

Returns if elem has visible skin depending on partial structure display.

 

 

APIAny_SetMasterLayoutOnLayoutID  18

 

APIAny_GetOpeningTransformationID  20

Returns an opening’s position and normal vector.

 

 

Stair element helpers  11

 

APIAny_SolveStairID  21

Checks and corrects a Stair’s baseline, if it’s invalid.

 

 

Property helpers  22

 

APIAny_CheckPropertyExpressionStringID 22

Checks if the given property expression is a syntactically valid one.

APIAny_GetPropertyExprReferenceStringID 22

Returns the string that can be used in expressions to refer to a specific property.

 

 

GDL helpers  24

 

APIAny_InterpretGDLScript3DID 24

Interprets a 3D GDL script with the same settings as GDL Editor.

 

New in API 26 From version 26 the GetElemTypeNameID goodie was moved to a separate ACAPI_Goodies_GetElemTypeName function.

New in API 26 From version 26 the ElemTypeToNeigID goodie was moved to a separate ACAPI_Goodies_ElemTypeToNeigID function.

New in API 26 From version 26 the NeigIDToElemTypeID goodie was moved to a separate ACAPI_Goodies_NeigIDToElemType function.

 

Requirements

Version: API 2.1 or later
Header: ACAPinc.h

 

See Also

General Functions, API Functions