You will need to add a slab with an ID of Wallhole for the shape of the opening. For more information with images, go to Help > ArchiCAD Help, when your browser opens click on the "Search" tab, and input "custom window" in the search box, in the results list "Saving Custom Shape Doors and Windows from the Project File" will lead to detailed information.
You should add a Signature to your Profile (click the Profile button near the top of this page) with your ArchiCAD version and operating system (see mine for an example) for more accurate help in this forum.
I recommend you to look into the Creating GDL Objects ITG published by Graphisoft. It was created for AC11 but it contains basic stuff which remains true for a long time. There's a whole chapter about "Auto saving non-rectangular windows" in it.
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...