cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Streamline your workflows and master BIM coordination! Program starts April 28!

Archicad C++ API
About Archicad add-on development using the C++ API.
SOLVED!

Get the selected element

Not applicable
Hi.
I select an element on first level.
I want to get the element after I switch to the second level.
ACAPI_Selection_Get the api does't work.
How can get it ? thanks.
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
How about:
1) Use ACAPI_Selection_Get first to collect the selected elements
2) Extract whatever data you need from the selection
3) Search for the elements that should receive the new data
4) Apply the data to elements (on whatever floor)
Ralph Wessel BArch
Central Innovation

View solution in original post

4 REPLIES 4
I assume you're working in the floor plan view? If so, ACAPI_Selection_Get can only get elements that are currently selected – if you can't select it as a user, this function won't retrieve it either. Can you describe the workflow you're trying to achieve? There might be a better solution.
Ralph Wessel BArch
Central Innovation
Not applicable
Ralph wrote:
I assume you're working in the floor plan view? If so, ACAPI_Selection_Get can only get elements that are currently selected – if you can't select it as a user, this function won't retrieve it either. Can you describe the workflow you're trying to achieve? There might be a better solution.
Yes,I'm working in the floor plan view.

I want to copy the properties of the selected element to other elements on another level.
Thanks.
Solution
How about:
1) Use ACAPI_Selection_Get first to collect the selected elements
2) Extract whatever data you need from the selection
3) Search for the elements that should receive the new data
4) Apply the data to elements (on whatever floor)
Ralph Wessel BArch
Central Innovation
Not applicable
Ralph wrote:
How about:
1) Use ACAPI_Selection_Get first to collect the selected elements
2) Extract whatever data you need from the selection
3) Search for the elements that should receive the new data
4) Apply the data to elements (on whatever floor)
Thanks.