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.

Which API function use for deleting navigator story, section, elevation, schedules in Teamwork?

Newbie
Participant

I am looking for functions to delete the above elements from teamwork file. I do not understand why the apistory_delete or database delete is working with only local file but not teamwork file.

Is there anyone could assist on this?

 

3 REPLIES 3
Erenford
Booster

Its the same API for teamwork but most likely its failing because in teamwork you need to reserve items before you can modify it, don't forget to release it after changes. Try looking into "Teamwork Control" or the ACAPI_TeamworkControl_***** APIs in the documentation, or check the "Teamwork_Control" addon example.

 

Or you can reserve the items manually yourself in ArchiCAD before starting the addon.

 

Note that I've only done element reservation so not really sure if there's anything there on databases.

Hi Erenford,

 

All items has been reserved and user also has modify right but still no luck to delete it.

Is there anything else to be check to make it work?

 

Are you doing story changes? I saw this on the API documentation:

https://archicadapi.graphisoft.com/documentation/api_storycmdtype


Remarks

The command is related to an existing story. It must be referred by the index field of the structure. Possible operations are listed in the API_StoryCmdID list.

Note, that in case story operations are disabled in team projects; except changing the active story.


Sorry, I guess I can't help you with that. I've checked with the Environment example addon and adding story indeed didn't work while in teamwork. Hopefully we can get a comment from a Graphisoft dev about this.

 

I tried using the Database example addon and did the following:

1) clicked the "create new detail database" and "create new worksheet database" menuitem -> it then created new items

2) released the new databases in teamwork -> items are no longer reserved

3) clicked the delete database menuitem -> it didn't work as expected

4) went and reserved it  then tried to delete it again -> it worked and was deleted

 

I know its not section/elevation database but I think its kind of the same since it uses the same class/structure.

Also as far as I know schedules are inaccessible by the API since its technically a separate addon, so I also can't help you with that.