SOLVED!
Building an Archicad 21 Add-on
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2018-01-30
09:18 AM
- last edited on
2023-07-12
08:36 PM
by
Doreena Deng
2018-01-30
09:18 AM
Hello,
I am a new Addon developer for Archicad 21. I know how to create one and make it work (with Visual Studio 2015). Today, I'd like to build one which allow me to scan every walls on a building plan, get their information (length, height...), get the connected walls information (position of the connection, angle...) and the roof information in order to generate Achicad objects (created by me) on an other plan according to this information. I dont understand very well English even if I understand fairly well the structures/unions of the documentation. I read it but I don't manage to use it properly to do what I want to do.
Can anybody help me to build my project ?
Regards.
I am a new Addon developer for Archicad 21. I know how to create one and make it work (with Visual Studio 2015). Today, I'd like to build one which allow me to scan every walls on a building plan, get their information (length, height...), get the connected walls information (position of the connection, angle...) and the roof information in order to generate Achicad objects (created by me) on an other plan according to this information. I dont understand very well English even if I understand fairly well the structures/unions of the documentation. I read it but I don't manage to use it properly to do what I want to do.
Can anybody help me to build my project ?
Regards.
Solved! Go to Solution.
Labels:
- Labels:
-
Add-On (C++)
1 ACCEPTED SOLUTION
Accepted Solutions
Solution

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2018-03-06 05:14 PM
2018-03-06
05:14 PM
Hello,
To scan every wall on a building plan, you can use the ACAPI_Element_GetElemList function, usingAPI_WallID as its typeID parameter. You will get a GS::Array of API_Guid-s, corresponding to the placed walls.
Using the GUIDs, you can get information about the elements, using the ACAPI_Element_Get with anAPI_Element object, with the given GUID in its header. In the API_Element 's wall member, you are able to get the height of the wall, and calculate its length using its beginning and end coordinates.
To get connection data about a wall, you'll have to use the ACAPI_Element_GetRelations function with anAPI_WallRelation object given as its relData parameter. Note that you'll have to call ACAPI_DisposeWallRelationHdls after you don't need the data any more, to prevent memory leaks.
Information about Roof elements can be retrieved in a similar manner, using the ACAPI_Element_GetElemList (withAPI_RoofID ) and ACAPI_Element_Get functions.
Best regards,
Dénes
To scan every wall on a building plan, you can use the ACAPI_Element_GetElemList function, using
Using the GUIDs, you can get information about the elements, using the ACAPI_Element_Get with an
To get connection data about a wall, you'll have to use the ACAPI_Element_GetRelations function with an
Information about Roof elements can be retrieved in a similar manner, using the ACAPI_Element_GetElemList (with
Best regards,
Dénes
1 REPLY 1
Solution

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2018-03-06 05:14 PM
2018-03-06
05:14 PM
Hello,
To scan every wall on a building plan, you can use the ACAPI_Element_GetElemList function, usingAPI_WallID as its typeID parameter. You will get a GS::Array of API_Guid-s, corresponding to the placed walls.
Using the GUIDs, you can get information about the elements, using the ACAPI_Element_Get with anAPI_Element object, with the given GUID in its header. In the API_Element 's wall member, you are able to get the height of the wall, and calculate its length using its beginning and end coordinates.
To get connection data about a wall, you'll have to use the ACAPI_Element_GetRelations function with anAPI_WallRelation object given as its relData parameter. Note that you'll have to call ACAPI_DisposeWallRelationHdls after you don't need the data any more, to prevent memory leaks.
Information about Roof elements can be retrieved in a similar manner, using the ACAPI_Element_GetElemList (withAPI_RoofID ) and ACAPI_Element_Get functions.
Best regards,
Dénes
To scan every wall on a building plan, you can use the ACAPI_Element_GetElemList function, using
Using the GUIDs, you can get information about the elements, using the ACAPI_Element_Get with an
To get connection data about a wall, you'll have to use the ACAPI_Element_GetRelations function with an
Information about Roof elements can be retrieved in a similar manner, using the ACAPI_Element_GetElemList (with
Best regards,
Dénes