# STEP-file

## Introduction

Let's take a look at our Window example.

```javascript
#13067= IFCWINDOW('2cXV28XOjE6f6irgi0CO$D',#42,'M_Fixed:0915 x 1830mm:353953',$,'M_Fixed:0915 x 1830mm',#35337,#13061,'353953',1830.,914.999999999999);
```

This lines follows this encoding template:

1. Instance Name
2. Entity Name
3. Attributes&#x20;

We can express this template in two different ways:

> `1. Instance Name` **=** `2. Entity name`**(**`3. Attributes`**)**

We have, in this example:

| Name          | Value                                                                                                                                                                                           |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Instance Name | #13067                                                                                                                                                                                          |
| Entity Name   | IFCWINDOW                                                                                                                                                                                       |
| Attributes    | <p>'2cXV28XOjE6f6irgi0CO$D',<br>#42,'M_Fixed:0915 x 1830mm:353953',</p><p>$,</p><p>'M_Fixed:0915 x 1830mm',</p><p>#35337,</p><p>#13061,</p><p>'353953',</p><p>1830.,</p><p>914.999999999999</p> |

## **STEP-file Encoding**

Here are some basic encoding rules

| **Name**      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Instance Name | <p>The instance name must consist of a positive integer. The instance name is only valid <strong>locally within the STEP-file</strong>. </p><p></p><ul><li>If the same content is exported again, the instance names may be different.</li></ul><p>The instance name is also used to reference other entity instances through attribute values or aggregate members.</p><p></p><ul><li>The referenced instance may be defined before or after the current instance.</li></ul> |
| Entity Name   | Instances are represented by writing the **name of the entity** in capital letters and then followed by the attribute values in the defined order within parentheses.                                                                                                                                                                                                                                                                                                         |
| Attributes    | <p></p><ul><li><p>Only explicit attributes get mapped</p><ul><li>Inverse, Derived and re-declared attributes are not listed since their values can be deduced from the other ones.</li></ul></li><li>Unset attribute values are given as "<strong>$</strong>".</li><li>Multuple values are comma separated</li></ul>                                                                                                                                                          |

Again, this can be visualized as:

> **#**`Instance Name` = `Entity name`(`Attributes`)

Or, as our example:

> `#13067` = `IFCWINDOW`(`'2cXV28X...`)

Or, as a single line:

```javascript
#13067= IFCWINDOW('2cXV28...);
```

### Additional Notes

| Mapping of other data types                                                                                                                               | Example     |
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| Enumeration, boolean and logical values are given in capital letters with a leading and trailing do                                                       | .TRUE.      |
| Integers and real values are used identical to typical programming languages                                                                              | 123         |
| String values are given in quotes.                                                                                                                        | "My string" |
| <p>For characters with a code greater than 126 a special encoding is used.<br><br>The character sets as defined in ISO 8859 and 10646 are supported. </p> | N/A         |
| The elements of aggregates (SET, BAG, LIST, ARRAY) are given in parentheses, separated by "**,**".                                                        | (1,2,3)     |
| Each entity instance is ended with a semi-colon                                                                                                           | ;           |

{% hint style="danger" %}
**Editor's note:**

I know that this can hard to understand. Please, take a good look at this article. Read it agian, think and reflect about the content.
{% endhint %}

{% hint style="danger" %}
Work in progress...
{% endhint %}
