We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

How to get module data created by another Addons?

Newbie
Participant

If Addons A create module data name 'AA' in project file P, then can Addons B in same file project get module data name 'AA' with ACAPI_ModulData_Get()?

 

1 REPLY 1
Joel Buehler
Enthusiast

I reeeeely hope its not possible to read Moduldata from another Add-On 😄 

 

"Data sections are identified uniquely by the add-on’s modul ID (‘MDID’) and an optional modul name string. This means the one data per add-on limitation of previous versions has been dissolved. "

 

since you cant start two add-ons with the same mdid id, this should be impossible. 

i did not try it but my understanding ist, that modul data is saved in a file that is in the add-on folder. theoretically you could write your own interpreter of that file... would be a awful hack but could work.

 

the documentation states about deleting old modul data:

 

  1. Quit Archicad if it's running.
  2. Delete or remove the add-on from its location.
    (Usually the Add-Ons folder of your Archicad installation directory.)
  3. Start up Archicad, and open the Project file in Archicad that you want to erase the add-on data from.
  4. Locate the "Archicad Temporary Folder"
    (It is on the Temporary Volume, which can be set through the Options/Preferences/Data Safety menu, Temporary Folder Location button (or the applying localized version of it.) Usually it's on the C: drive on Windows, or in the System Folder of the System Drive on the Macintosh.)
  5. Switch into the APIData subfolder.
  6. Locate the tmp file that belongs to your add-on.
    (The corresponding file should contain the filename of your add-on at its 64th byte.)
  7. Delete the located file.
  8. Save the project in Archicad.

but like i said, that would be an awful hack... 

if i had to implement a datashare between two addons i would do one of the following:

 

1. Make that the addon looks from the outside as two addons and are in fact just one apx

2. use the communication manager to send data between the two add-ons. 

 

Important: Moduldata ist legacy. You should use AddOnObjects!

 

from the documentation:

 

"This is a legacy technology, please use Add-On Objects instead."

 

Old: 

https://graphisoft.github.io/archicad-api-devkit/group___modul_data.html#details

 

New: 

https://graphisoft.github.io/archicad-api-devkit/group___add_on_object.html