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

Get the selected element

Anonymous
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
Ralph Wessel
Mentor
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
Software Engineer Speckle Systems

View solution in original post

4 REPLIES 4
Ralph Wessel
Mentor
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
Software Engineer Speckle Systems
Anonymous
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
Ralph Wessel
Mentor
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
Software Engineer Speckle Systems
Anonymous
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.