Exporting to .GEM format

Hi all,

I am in the middle of an “R&D” type investigation in my work to improve the workflow from Revit > IESVE (Energy software). I am looking into a file format called .GEM. This is a text file with the .gem extension, and contains geometric data about the rooms/spaces (see attached GEM file, i have changed to a .txt file so i can upload) - I have commented on this to explain what each section is, but i am struggling to understand the full structure and IES do not offer support for this as its not a supported format for user manipulation.
I need to reformat my revit data in dynamo to output in the same structure as a GEM file, which is easy enough.
The GEM file contains some preface text which relates to colours, layers, site coordinates, etc., then the main body is just the coordinates for each Vertex point of the room geometry. Under that is where i am struggling. IES stated that the “4 1 2 3 4” section indicates the surface has 4 surfaces (which i dont understand) and the “0” below each set of numbers indicates the number of openings on that surface. Does anyone have any information regarding the structure of the GEM files or able to point me somewhere that does?Example box room_Commented.txt (1.2 KB)

This appears to be a type of mesh format.

I would think the first number in your surface definition indicates if the mesh is a quad or a triangular mesh - or how many edges/vertices define the face.

The next set of numbers appear to refer to which point defines the mesh - go back to the XYZ coordinate list and grab the vertex at each given point in the list. Lastly build the mesh from the set.

So this line:
4 1 2 3 4

  • Is a quad definition not a triangle one.
  • The first vertex it is defined by is the first one in the list, so put that in a new list.
  • The second vertex is the second one in the list, so put that in the new list.
  • The third vertex is the third in the list, so put that in the new list.
  • The fourth vertex is the fourth one in the list, so put that in the new list.
  • Now take the new list and build a face.

Looking over the vertex definitions (the XYZ values), this is the ‘floor’ of your box.

To know what is really happening you need something more complex than a ‘closed cube’. Try building a six wall version with a few windows in one wall, one window in another, a door in another, a so on. Try and make them unique enough that you can identify the shape easily.

1 Like

Thanks for the reply. This makes a lot of sense. I will try some iterations based on this info.

1 Like