We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2 weeks ago - last edited a week ago by Laszlo Nagy
Hello, I'm pretty new to archicad api coding. I'm trying to do what I think to be a very simple task, create an object via api. I'm doing a sample code that should create an object in coordinates (0,0). I'm using an object that is already part of default archicad library (Culla.gsm for italian archicad). Could someone help me find what I'm doing wrong? I want also to say that, for now, I'm using a DEMO version of Archicad, please tell me if this could also be the cause of the issue.
When I run the add-on, I get error code -2130313112 when calling ACAPI_Element_Create. This is the case without memo. If I de-comment memo and call ACAPI_Element_Create with memo archicad crashes.
I'm pasting the code I wrote:
Thanks in advance
Operating system used: Windows 11
Monday
I recommend starting from some of the example projects - use them to see how the API works and then extend them a bit for experimentation. Some good places to start for creating objects are "Element_test" and "LibPart_Test". Both have examples for creating an object instance, e.g. a window.