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

New using a template file.

Anonymous
Not applicable
How do I create a new project with my own given template file (*.tpl) using the dev toolkit?
4 REPLIES 4
Ralph Wessel
Mentor
graffiti wrote:
How do I create a new project with my own given template file (*.tpl) using the dev toolkit?
You can direct ArchiCAD to open a specified file with ACAPI_Automate and APIDo_OpenID. Presumably just opening the template file would accomplish your aims?
Ralph Wessel BArch
Software Engineer Speckle Systems
Anonymous
Not applicable
Yes, I wasn't sure that was the correct way.

I need to reset the libraries first, so I call ACAPI_Automate with APIDo_NewProjectID and then call ACAPI_Automate again with APIDo_OpenID.

I was hoping there was a way to do it faster in one call, but I guess not.

Thanks.
Ralph Wessel
Mentor
graffiti wrote:
I need to reset the libraries first, so I call ACAPI_Automate with APIDo_NewProjectID and then call ACAPI_Automate again with APIDo_OpenID.
I don't think it is necessary to reset the libraries before opening the template. When the template is opened, ArchiCAD should automatically load whatever libraries are linked to it anyway. Try it and let me know if this is correct.
Ralph Wessel BArch
Software Engineer Speckle Systems
Anonymous
Not applicable
Hi,

Sorry for my late reply.
I'm sure your solution will work,
but I actually need to reset the libraries because I shouldn't use the ones linked to the template file.
I should have been more clear about it.

Thanks.