AFAIK, you use the ACAPI_Element_Create function.
Take a look at the section of the documentation called "Element Overview".
(Of course, to be like Roofmaker, you understand that you need to set things up so that your add-on receives notifications about the elements that you are associating your objects with.)
Karl
One of the forum moderators
AC 28 USA and earlier • macOS Sequoia 15.2, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB