# IFC-Dictionary

**URL:** <https://forums.sketchup.com/t/ifc-dictionary/233919>\
**Category:** Ruby API\
**Tags:** sketchup\
**Created:** [June 27, 2023, 2:15pm UTC](https://forums.sketchup.com/t/ifc-dictionary/233919 "2023-06-27T14:15:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ams](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@ams](https://forums.sketchup.com/u/ams)\
**Post date:** [June 27, 2023, 2:15pm UTC](https://forums.sketchup.com/t/ifc-dictionary/233919/1 "2023-06-27T14:15:07Z")

</div>

hello,  
when i extract the ifc attributes from the disctonary (here a ifcdoor-object), i get a clear overview:

```auto
.....
****** OverallHeight 1 5532
      is_hidden false
****** OverallWidth 1 5532
      is_hidden false
****** Tag 1 5532
      is_hidden false
****** ObjectPlacement 1 5532
      is_hidden true
****** Representation 1 5532
      is_hidden true
****** ObjectType 1 5532
      is_hidden false
****** GlobalId 1 5532
      is_hidden true
****** OwnerHistory 1 5532
      is_hidden true
****** Name 1 5532
      is_hidden false
****** Description 1 5532
      is_hidden false
****** href 3 5532
      attribute_type string
      is_hidden true
      value   
****** ref 3 5532
      attribute_type string
      is_hidden true
      value   
****** proxy 3 5532
      attribute_type string
      is_hidden true
      value   
****** edo 3 5532
      attribute_type string
      is_hidden true
      value   
****** instanceAttributes 1 5532
      is_hidden true

```

question 1:

is this a normal hash? i would like to add own keys…

question 2:  
what ever i try, i cannot assign a value , for example, to the width parameter in ifcdoor (or many others).

are there limitations in skp api 2021 ?

thanx  
stan

---

<div class="post-metadata">

**Author:** ![rtches](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/rtches/32/131827_2.png) [@rtches](https://forums.sketchup.com/u/rtches)\
**Post date:** [June 27, 2023, 6:42pm UTC](https://forums.sketchup.com/t/ifc-dictionary/233919/2 "2023-06-27T18:42:54Z")

</div>

This may help you

> **[Custom Parameters | SketchUcation](https://sketchucation.com/plugin/2637-custom_parameters)**
>
> 3D SketchUp Community for Design and Engineering Professionals.

---

<div class="post-metadata">

**Author:** ![ams](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@ams](https://forums.sketchup.com/u/ams)\
**Post date:** [June 27, 2023, 7:49pm UTC](https://forums.sketchup.com/t/ifc-dictionary/233919/3 "2023-06-27T19:49:55Z")

</div>

hello an thanx!

your plugin seems to be a very useful front-end-solution.  
u made it : pset in skp, great respect!

yet i am still looking for some information in the api, which would allow me to define my own parameters within the exported ifc, but with my own parameters in my own ifc-viewer and in batch routines.  
means: syntax for writing own parameters+values inti ifc.

anyway: thanx for helping !!

stan

---

<div class="post-metadata">

**Author:** ![rtches](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/rtches/32/131827_2.png) [@rtches](https://forums.sketchup.com/u/rtches)\
**Post date:** [June 27, 2023, 8:35pm UTC](https://forums.sketchup.com/t/ifc-dictionary/233919/4 "2023-06-27T20:35:03Z")

</div>

```rb
instance.definition.attribute_dictionary("IFC 2x3") 
instance.definition.attribute_dictionary("IFC 4")

```

---

<div class="post-metadata">

**Author:** ![ams](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@ams](https://forums.sketchup.com/u/ams)\
**Post date:** [June 27, 2023, 9:15pm UTC](https://forums.sketchup.com/t/ifc-dictionary/233919/5 "2023-06-27T21:15:03Z")

</div>

hi!

yes, that is where i stick:

i iterate thru schemes:

```auto
ifc_dict = inst.definition.attribute_dictionary(my_scheme)
						 
sub_ifc_dicts = ifc_dict.attribute_dictionaries
						 
status = ifc_dict.set_attribute "ZF_SET_0", "Parameter1", "#{inst.definition.name}"
status = ifc_dict.set_attribute "ZF_SET_0", "Parameter2", "#{inst.definition.instances.length}"

```

and can iterate thru dictionaries in ruby conslole and se the ZF\_SET\_0

but exporting ti ifc and opening in a external viewer show:

 ![image](https://global.discourse-cdn.com/sketchup/original/3X/7/e/7e31a723c175ab6e9f073919245c91e94305cb9a.jpeg)

probably my new dictionary is at a wrong level…

stan

and: sketchup shows the parameters, but no values …

 ![image](https://global.discourse-cdn.com/sketchup/original/3X/2/b/2b825bd9213eb7b51ebc055a5d2d575210ce9979.png)

---

<div class="post-metadata">

**Author:** ![rtches](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/rtches/32/131827_2.png) [@rtches](https://forums.sketchup.com/u/rtches)\
**Post date:** [June 28, 2023, 6:01am UTC](https://forums.sketchup.com/t/ifc-dictionary/233919/6 "2023-06-28T06:01:00Z")

</div>

@ams Please post correctly formatted and colorized code, [[How to] Post correctly formatted and colorized code on the forum?](https://forums.sketchup.com/t/how-to-colourize-code-on-the-forum-wiki/46189)

You are skipping quite a few steps to insert values in your instances.

This is the attribute dictionary: (IFC 4 in this case)

```rb
ifcDict = ent.definition.attribute_dictionary("IFC 4")

```

This is your Pset name, it’s important to start with “Pset\_”

```rb
ifcYourPsetName = ifcDict.attribute_dictionary("Pset_YourPsetName", true)

```

This is your parameter name

```rb
ifcYourPsetNameParameterName =ifcYourPsetName.attribute_dictionary(defDic, true)

```

And finally this is your parameter value name:

```rb
ifcYourPsetNameParameterName.set_attribute "IfcLabel", "value", val.to_s
ifcYourPsetNameParameterName.set_attribute "IfcLabel", "is_hidden", false
ifcYourPsetNameParameterName.set_attribute "IfcLabel", "attribute_type", String

```

You must take into account that for the parameter to appear you must set the `is_hidden` value to `false` and set the `attribute_type` you are going to insert.

Finally, I strongly recommend you to export with Ifc Manager in order to export your “Pset” correctly.

I hope it helps you. And please modify your post in order to have a clean post easy to search and read in the future.

---

<div class="post-metadata">

**Author:** ![rtches](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/rtches/32/131827_2.png) [@rtches](https://forums.sketchup.com/u/rtches)\
**Post date:** [June 28, 2023, 6:07am UTC](https://forums.sketchup.com/t/ifc-dictionary/233919/7 "2023-06-28T06:07:59Z")

</div>

> [@ams](#):
>
> which would allow me to define my own parameters within the exported ifc, but with my own parameters in my own ifc-viewer

That is **exactly** what my plugin **does**. Your own parameters in your own ifc-viewer.

---

<div class="post-metadata">

**Author:** ![rtches](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/rtches/32/131827_2.png) [@rtches](https://forums.sketchup.com/u/rtches)\
**Post date:** [June 28, 2023, 6:10am UTC](https://forums.sketchup.com/t/ifc-dictionary/233919/8 "2023-06-28T06:10:56Z")

</div>

By the way I changed the topic to the correct category

---

<div class="post-metadata">

**Author:** ![ams](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@ams](https://forums.sketchup.com/u/ams)\
**Post date:** [June 28, 2023, 7:18am UTC](https://forums.sketchup.com/t/ifc-dictionary/233919/9 "2023-06-28T07:18:37Z")

</div>

hi rtches,  
thank you so much - this is exactly thy syntax (and the needed structure of the library), i was missing and could not find.  
it opens doors 🙂  
i will report the succes (hopefully soon).

regards stan

---

<div class="post-metadata">

**Author:** ![rtches](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/rtches/32/131827_2.png) [@rtches](https://forums.sketchup.com/u/rtches)\
**Post date:** [June 28, 2023, 10:04am UTC](https://forums.sketchup.com/t/ifc-dictionary/233919/10 "2023-06-28T10:04:19Z")

</div>

Please @ams update your previos post to be readable with the correct format. And mark the post as solved if you consider it closed.

---

<div class="post-metadata">

**Author:** ![ams](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@ams](https://forums.sketchup.com/u/ams)\
**Post date:** [June 29, 2023, 1:47pm UTC](https://forums.sketchup.com/t/ifc-dictionary/233919/11 "2023-06-29T13:47:10Z")

</div>

@[rtches](https://forums.sketchup.com/u/rtches):

1. thanx for the help. i managed to create a pset the ifc and save my values into in and also set single values in all 3 standard schemes. so far, so good.  
however, when i export it  
-by skp, and reimport, it is not there.  
-using the ifc-manager: it gives me errors (some undefined id in the bt\_manager).  
so probably i still did not implement the pset correctly.

2. is there any guide for how i have to reformat my texts?

thanx and regards

stan

---

<div class="post-metadata">

**Author:** ![dezmo](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/dezmo/32/51058_2.png) [@dezmo](https://forums.sketchup.com/u/dezmo)\
**Post date:** [June 29, 2023, 2:03pm UTC](https://forums.sketchup.com/t/ifc-dictionary/233919/12 "2023-06-29T14:03:01Z")

</div>

> [@ams](#):
>
> is there any guide for how i have to reformat my texts?

See the link in Post #6… 😉

---

<div class="post-metadata">

**Author:** ![ams](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@ams](https://forums.sketchup.com/u/ams)\
**Post date:** [June 29, 2023, 2:26pm UTC](https://forums.sketchup.com/t/ifc-dictionary/233919/13 "2023-06-29T14:26:33Z")

</div>

got it 🙂 thanx,  
stan

---

<div class="post-metadata">

**Author:** ![ams](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@ams](https://forums.sketchup.com/u/ams)\
**Post date:** [June 30, 2023, 8:40am UTC](https://forums.sketchup.com/t/ifc-dictionary/233919/14 "2023-06-30T08:40:14Z")

</div>

before i close the topic, only 1 question:  
can it be, that skp does not reimport this own defined pset within 2x3 per se?  
otherwise i did something wrong and habe to investigate…  
thanx  
stan

---

<div class="post-metadata">

**Author:** ![rtches](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/rtches/32/131827_2.png) [@rtches](https://forums.sketchup.com/u/rtches)\
**Post date:** [June 30, 2023, 1:33pm UTC](https://forums.sketchup.com/t/ifc-dictionary/233919/15 "2023-06-30T13:33:00Z")

</div>

You must have done something wrong. In any case, **3 schemes?** you should review it. Ifc is not as easy as adding dictionaries

---

<div class="post-metadata">

**Author:** ![ams](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@ams](https://forums.sketchup.com/u/ams)\
**Post date:** [June 30, 2023, 1:58pm UTC](https://forums.sketchup.com/t/ifc-dictionary/233919/16 "2023-06-30T13:58:16Z")

</div>

how right you are…

well, i managed it to create a pset, which shows correctly (i think) in skp:

 ![image](https://global.discourse-cdn.com/sketchup/original/3X/e/0/e0447e1af199baadd448dd92c3c25d7478c5d5bb.png)

and reimport in new empty project gives me

![image](https://global.discourse-cdn.com/sketchup/original/3X/f/4/f467d07c4b532214e87c8d0684448a9c0080f290.png)  
and expanded:

 ![image](https://global.discourse-cdn.com/sketchup/original/3X/3/9/3987c4903f9cde4e9ecdeabe68709d6fbae22ca7.png)

so i stick a bit…

i think, i make a day off 🙂  
stan

---

<div class="post-metadata">

**Author:** ![rtches](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/rtches/32/131827_2.png) [@rtches](https://forums.sketchup.com/u/rtches)\
**Post date:** [June 30, 2023, 2:08pm UTC](https://forums.sketchup.com/t/ifc-dictionary/233919/18 "2023-06-30T14:08:23Z")

</div>

Take a look to the differences between the tree in Ifc2x3 and Ifc4

---

<div class="post-metadata">

**Author:** ![ams](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@ams](https://forums.sketchup.com/u/ams)\
**Post date:** [June 30, 2023, 2:27pm UTC](https://forums.sketchup.com/t/ifc-dictionary/233919/19 "2023-06-30T14:27:18Z")

</div>

ok,  
but as a simple user,

i have only 2x3 - scheme in the model ,

i export with standard-sketchup,  
import with standard sketchup.,

an that is the result.

i my images actually 4 oder 4x3 is not involved, …

but i will check , what you wrote…

thanx  
stan

new file after import:  
 ![image](https://global.discourse-cdn.com/sketchup/original/3X/3/8/380172b96aaade09929755e1e800dfe628cce893.png)

---

<div class="post-metadata">

**Author:** ![MikeWayzovski](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/mikewayzovski/32/98346_2.png) [@MikeWayzovski](https://forums.sketchup.com/u/MikeWayzovski)\
**Post date:** [June 30, 2023, 6:16pm UTC](https://forums.sketchup.com/t/ifc-dictionary/233919/20 "2023-06-30T18:16:27Z")

</div>

Check this thread also about adding your own classification (or psets):

> [@MikeWayzovski's gallery](https://forums.sketchup.com/t/mikewayzovskis-gallery/183302):
>
> Voortzetting van de discussie [Cotty's gallery images](https://forums.sketchup.com/t/cottys-gallery-images/17043/613): Working on a classification: In SketchUp: In Layout Final result: See attached model with Classification inside Model Info \> Classifications [Bouwbesluit.skp](https://forums.sketchup.com/uploads/short-url/aTlWnDTxC394NgaYuforNXYm3ao.skp) (377,2 KB) @brewsky @RichardMuller would this be usefull?

---

<div class="post-metadata">

**Author:** ![AndrewRubySketch](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/andrewrubysketch/32/182273_2.png) [@AndrewRubySketch](https://forums.sketchup.com/u/AndrewRubySketch)\
**Post date:** [July 4, 2023, 3:32am UTC](https://forums.sketchup.com/t/ifc-dictionary/233919/21 "2023-07-04T03:32:45Z")

</div>

There is an issue with IFC 2x3 in the Sketchup IFC exporter; Sketchup has been notified about it several times, I ended up giving up & I have not tested IFC4.

[Next page](https://forums.sketchup.com/t/ifc-dictionary/233919.md?page=2)
