But you can’t do it like eg. the slab tool, where the user can draw a polygon. You have to add parameters to control the number of sides, and each vertex’s coordinates. Use editable hotspots on the vertices to let the user change them easily.
Another possibility starting with AC21 is to use a profile parameter: the user can edit the profile in the profile editor as a drawing, and your object will change accordingly.
Software Engineer, Library Team GRAPHISOFT SE