Archicad 29 C++ API
Loading...
Searching...
No Matches
Hierarchical editing

Functions dealing with Hierarchical Element-specific information, such as Edit Mode, stair solving and so on. More...

Functions

GSErrCode ACAPI_HierarchicalEditing_IsInEditMode (bool &isInEditMode)
 Returns if application is in hierarchical editing mode. Curtain Wall, Beam, Column, Stair, Railing, MEP Elements, etc...
 
GSErrCode ACAPI_HierarchicalEditing_IsInCurtainWallEditMode (bool &isInEditMode, API_Guid *editedCurtainWall=nullptr)
 Returns if application is in curtain wall editing mode.
 
GSErrCode ACAPI_HierarchicalEditing_IsInStairEditMode (bool &isInEditMode, API_Guid *editedStair=nullptr)
 Tells if application is in Stair Editing mode.
 
GSErrCode ACAPI_HierarchicalEditing_IsInBeamEditMode (bool &isInEditMode, API_Guid *editedBeam=nullptr)
 Returns if application is in beam editing mode.
 
GSErrCode ACAPI_HierarchicalEditing_IsInColumnEditMode (bool &isInEditMode, API_Guid *editedColumn=nullptr)
 Returns if application is in column editing mode.
 
GSErrCode ACAPI_HierarchicalEditing_SolveStair (API_StairType *apiStair, API_ElementMemo *apiMemo, API_StairSolutionID *solution)
 Creates a valid stair baseline from invalid data.
 
GSErrCode ACAPI_HierarchicalEditing_GetHierarchicalElementOwner (const API_Guid *elemApiGuid, const API_HierarchicalOwnerType *hierarchicalOwnerType, API_HierarchicalElemType *hierarchicalElemType, API_Guid *ownerElemApiGuid)
 Returns the owner of the child elem in hierarchical elem.
 
GSErrCode ACAPI_HierarchicalEditing_EditHierarchicalElem (const API_Guid *guid)
 
GSErrCode ACAPI_HierarchicalEditing_CancelHierarchicalElem ()
 Cancel changes in Hierarchical Elem (Curtain Wall, Stair, Railing, Beam, Column) editing mode.
 
GSErrCode ACAPI_HierarchicalEditing_OkHierarchicalElem ()
 Accept changes in Hierarchical Elem (Curtain Wall, Stair, Railing, Beam, Column) editing mode.
 
void ACAPI_GetReleaseNumber (API_ServerApplicationInfo *serverApplicationInfo)
 

Detailed Description

Functions dealing with Hierarchical Element-specific information, such as Edit Mode, stair solving and so on.

Function Documentation

◆ ACAPI_GetReleaseNumber()

void ACAPI_GetReleaseNumber ( API_ServerApplicationInfo * serverApplicationInfo)

Returns information on the server application.

Since
Archicad 26
Parameters
serverApplicationInfo[out] Contains the main and maintenance release number of the server application. The main version for the current release is equal to the ServerMainVers_2900 constant in ACAPinc.h.
Remarks
If you have features or workarounds in your add-on that work only with special releases of the server application, you can obtain that version information during runtime with this function.

◆ ACAPI_HierarchicalEditing_CancelHierarchicalElem()

GSErrCode ACAPI_HierarchicalEditing_CancelHierarchicalElem ( )

Cancel changes in Hierarchical Elem (Curtain Wall, Stair, Railing, Beam, Column) editing mode.

Returns
  • NoError - The function has completed with success.
  • APIERR_REFUSEDCMD - Archicad is not in Curtain Wall, Stair, Railing, Beam or Column editing mode.
Remarks
ou are able to cancel changes made in Curtain Walls, Stairs, Railings, Beams and Columns 3D editing mode via this function. This function performs complete operations, so it cannot be called neither during undoable operations nor during non-undoable commands. See more details on this topic at Command Overview.

◆ ACAPI_HierarchicalEditing_EditHierarchicalElem()

GSErrCode ACAPI_HierarchicalEditing_EditHierarchicalElem ( const API_Guid * guid)

Change to Hierarchical Elem (Curtain Wall, Stair, Railing, Beam, Column) editing mode.

Parameters
guid[in] guid of the hierarchical elem (curtain wall, stair, railing, beam, column) to be open for editing in 3D.
Returns
  • NoError - The function has completed with success.
  • APIERR_REFUSEDCMD - It is already in hierarchical editing mode.
  • APIERR_BADPARS - guid is not a valid curtain wall, stair, railing, beam or column guid.
Remarks
Switch to 3D editing mode of a hierarchical elem (curtain wall, stair, railing, beam, column). This function performs complete operations, so it cannot be called neither during undoable operations nor during non-undoable commands. See more details on this topic at Command Overview.

◆ ACAPI_HierarchicalEditing_GetHierarchicalElementOwner()

GSErrCode ACAPI_HierarchicalEditing_GetHierarchicalElementOwner ( const API_Guid * elemApiGuid,
const API_HierarchicalOwnerType * hierarchicalOwnerType,
API_HierarchicalElemType * hierarchicalElemType,
API_Guid * ownerElemApiGuid )

Returns the owner of the child elem in hierarchical elem.

Parameters
elemApiGuid[in] The guid of the element.
hierarchicalOwnerType[in]
API_HierarchicalOwnerType Meaning
API_RootHierarchicalOwner Owner means the root of the hierarchical tree, so the function will return the main element of the hierarchical element.
API_ParentHierarchicalOwner Owner means parent relationship in the hierarchical tree, so it's possible that the returned owner element is also a child.
hierarchicalElemType[out]
API_HierarchicalElemType Meaning
API_MainElemInMultipleElem The element is the main element of the hierarchical element, such as Curtain Wall, Stair, Railing
API_ChildElemInMultipleElem The element is a child element in the hierarchical element, such as Curtain Wall Frame, Tread, ...
API_SingleElem This element isn't part of a hierarchical element, such as Wall, Slab, ...
API_UnknownElemType Occurs in case of error.
ownerElemApiGuid[out] The input element or the owner element of the hierarchical element if the input element is a child element of a hierarchical element.
Returns
  • NoError - The operation was successful.
  • APIERR_BADPARS - Some of the parameters are nullptr.

◆ ACAPI_HierarchicalEditing_IsInBeamEditMode()

GSErrCode ACAPI_HierarchicalEditing_IsInBeamEditMode ( bool & isInEditMode,
API_Guid * editedBeam = nullptr )

Returns if application is in beam editing mode.

Parameters
isInEditMode[out] true if application is in Beam Edit mode, false otherwise.
editedBeam[out] (optional) The GUID of the currently edited beam.
Returns
NoError, if the function completed with success.
Remarks
You can use this function to check the state of the applicaton; many things work differently in beam editing mode.
Example
bool isInBeamEditMode = false;
GSErrCode err = ACAPI_HierarchicalEditing_IsInBeamEditMode (isInBeamEditMode);
if (err != NoError) {
WriteReport_Alert ("Error");
} else {
if (isInBeamEditMode) {
WriteReport_Alert ("Archicad is in Beam Hierarchical Editing Mode");
} else {
WriteReport_Alert ("Archicad is not in Beam Hierarchical Editing Mode");
}
}

◆ ACAPI_HierarchicalEditing_IsInColumnEditMode()

GSErrCode ACAPI_HierarchicalEditing_IsInColumnEditMode ( bool & isInEditMode,
API_Guid * editedColumn = nullptr )

Returns if application is in column editing mode.

Parameters
isInEditMode[out] true if application is in Column Edit mode, false otherwise.
editedColumn[out] (optional) The GUID of the currently edited column.
Returns
NoError, if the function completed with success.
Remarks
You can use this function to check the state of the applicaton; many things work differently in column editing mode.
Example
bool isInColumnEditMode = false;
GSErrCode err = ACAPI_HierarchicalEditing_IsInColumnEditMode (isInColumnEditMode);
if (err != NoError) {
WriteReport_Alert ("Error");
} else {
if (isInColumnEditMode) {
WriteReport_Alert ("Archicad is in Column Hierarchical Editing Mode");
} else {
WriteReport_Alert ("Archicad is not in Column Hierarchical Editing Mode");
}
}

◆ ACAPI_HierarchicalEditing_IsInCurtainWallEditMode()

GSErrCode ACAPI_HierarchicalEditing_IsInCurtainWallEditMode ( bool & isInEditMode,
API_Guid * editedCurtainWall = nullptr )

Returns if application is in curtain wall editing mode.

Parameters
isInEditMode[out] true if application is in Curtain Wall Edit mode, false otherwise.
editedCurtainWall[out] (optional) The GUID of the currently edited curtain wall.
Returns
NoError, if the function completed with success.
Remarks
You can use this function to check the state of the application; many things work differently in curtain wall editing mode.
Example
bool isInCurtainWallEditMode = false;
GSErrCode err = ACAPI_HierarchicalEditing_IsInCurtainWallEditMode (isInCurtainWallEditMode);
if (err != NoError) {
WriteReport_Alert ("Error");
} else {
if (isInCurtainWallEditMode) {
WriteReport_Alert ("Archicad is Curtain Wall Hierarchical Editing Mode");
} else {
WriteReport_Alert ("Archicad is not in Curtain Wall Hierarchical Editing Mode");
}
}

◆ ACAPI_HierarchicalEditing_IsInEditMode()

GSErrCode ACAPI_HierarchicalEditing_IsInEditMode ( bool & isInEditMode)

Returns if application is in hierarchical editing mode. Curtain Wall, Beam, Column, Stair, Railing, MEP Elements, etc...

Parameters
isInEditMode[out] true if application is in Hierarchical Edit mode, false otherwise.
Returns
NoError, if the function completed with success.
Remarks
You can use this function to check the state of the applicaton; many things work differently in hierarchical editing mode.
Example
bool isInEditMode = false;
GSErrCode err = ACAPI_HierarchicalEditing_IsInEditMode (isInEditMode);
if (err != NoError) {
WriteReport_Alert ("Error");
} else {
if (isInEditMode) {
WriteReport_Alert ("Archicad is in Hierarchical Editing Mode");
} else {
WriteReport_Alert ("Archicad is not in Hierarchical Editing Mode");
}
}

◆ ACAPI_HierarchicalEditing_IsInStairEditMode()

GSErrCode ACAPI_HierarchicalEditing_IsInStairEditMode ( bool & isInEditMode,
API_Guid * editedStair = nullptr )

Tells if application is in Stair Editing mode.

Parameters
isInEditMode[out] true if application is in Stair Edit mode, false otherwise.
editedStair[out] (optional) The GUID of the currently edited stair.
Returns
NoError, if the function completed with success.
Remarks
You can use this function to check the state of the application; many things work differently in stair editing mode.
Example
bool isInStairEditMode = false;
GSErrCode err = ACAPI_HierarchicalEditing_IsInStairEditMode (isInStairEditMode);
if (err != NoError) {
WriteReport_Alert ("Error");
} else {
if (isInStairEditMode) {
WriteReport_Alert ("Archicad is in Stair Hierarchical Editing Mode");
} else {
WriteReport_Alert ("Archicad is not in Stair Hierarchical Editing Mode");
}
}

◆ ACAPI_HierarchicalEditing_OkHierarchicalElem()

GSErrCode ACAPI_HierarchicalEditing_OkHierarchicalElem ( )

Accept changes in Hierarchical Elem (Curtain Wall, Stair, Railing, Beam, Column) editing mode.

Returns
  • NoError - The function has completed with success.
  • APIERR_REFUSEDCMD - Archicad is not in Curtain Wall, Stair, Railing, Beam or Column editing mode.
Remarks
You are able to accept changes made in Curtain Walls, Stairs, Railings, Beams or Columns 3D editing mode via this function. This function performs complete operations, so it cannot be called neither during undoable operations nor during non-undoable commands. See more details on this topic at Command Overview.

◆ ACAPI_HierarchicalEditing_SolveStair()

GSErrCode ACAPI_HierarchicalEditing_SolveStair ( API_StairType * apiStair,
API_ElementMemo * apiMemo,
API_StairSolutionID * solution )

Creates a valid stair baseline from invalid data.

Parameters
apiStair[in/out] The stair element to be checked.
apiMemo[in/out] The memo of the stair element to be checked.
solution[out] The result of the operation:
Result Meaning
APISS_Correct The baseline was already correct, no operation was needed.
APISS_Solved The baseline was successfully solved.
APISS_NotSolved The baseline could not be solved.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - baseline or solution is nullptr.