cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
2024 Technology Preview Program

2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations

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

Problem with ACAPI_Dialog_SettingsDialog (in older versions APIIo_SettingsDialogID)

Geza Bohm
Participant

Hi,
the function “ACAPI_Dialog_SettingsDialog” is partly working: AC shows the required dialog.
- if there is no selection, the default settings are shown,
- if there is proper selection, the settings of elements are shown.

The problem comes when you fill new values into the dialog (so you change the settings) and click OK button. The new alues will not be written into the selected element(s). Also the defaults settings remain untouched. It seems the typed new values are lost, at least I do not know how can I get them.

Actually, this function is pretty useless, since you cannot modify any settings with it. All you can do is read the actual settings…
And, it works fine if there is no selection: the default settings will be changed. But if there is any element selected, the dialog will not make any change.

Please let me know if there is any way to get/read the typed values. Or let me know if you know about this problem, and it is really on the API side (and there is no workaround).

Thanks, best regards:
Géza

3 REPLIES 3
LChen
Graphisoft
Graphisoft

Hi,

I'd like suggest you to use ACAPI_Selection_Get() to get the selected guid(s), then call ACAPI_Element_Get() to read element values if you'd like get/read element attributes. If you'd like to change the default settings, call ACAPI_Selection_DeselectAll() first, then change the default value(s).

HTH.

Geza Bohm
Participant

Dear LChen,

thanks for the answer, however I feel I was completely misunderstood.

I am well aware of the functions ACAPI_Element_XYZ and ACAPI_Selection_XZY, my question was about ACAPI_Dialog_SettingsDialog.

 

The effect of this function is something similar to the double-click on an icon in the toolbox (wall, slab, roof, etc).

Moreover, since it is a Settings dialog, if an element is selected then it should bring up the settings dialog for that element, related type and data is filled from the selection.

And it does so, until this point it is OK.

But if you close this dialog with OK button, nothing happens. This is my problem: the function ACAPI_Dialog_SettingsDialog brings up a totally misleading dialog, since you cannot change anything with it.

What is the point then, to have this function, without the ability to do something with the dialog? Or is there a secret way, how can you extract the data what the user has given into this dialog?

Waiting for your answer, best regards:
Géza

 

LChen
Graphisoft
Graphisoft

Hi Geza,
This function is only for developer to call the setting dialog UI in API and you can extract data after user press OK button. The point to have this function is, developer needn't to create similar UI if you need user to input/change settings. But unfortunately it doesn't support selection mode now.

HTH

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!