I'd like to define a new preset IFC rule creating new IFC properties and filling it with some preset data.
I saw some coding into the preset IFC rules defined in AC out of the box but I didn't find a "simple & readable" example of xml coding for new IFC properties.

For example I'd like to fill the field IFC "description" with a text using a custom made db properly coded as per IFC syntax

Is it possible?
Where can I find documentation on the IFC syntax and coding?

Wow, it does work. Actually, what I did not know is if there is any command in the Script section of the XML file that can do this. I did not find any info on it during my search on the Internet. How did you know that this is the syntax you need to use?

Actually, I have modified your XML a bit so ARCHICAD will recognize it as a proper Rule file when placed in the IFC Rules folder. You may have to restart ARCHICAD after placing it in the IFC Rules folder. (Copy-paste the code to a Text Editor and save it as XML format.)
Here it is:

For anyone else trying to understand this:
So basically you can apply a predefined rule which will create any number of IFC Properties, and even the IFC Property Set they should be placed under.
The only limitation I see here at the moment is that this cannot be done in the IFC Scheme Setup Dialog. You have to select the elements you wish to add the IFC Properties to, go to their Settings Dialog, click the Manage IFC Properties button, click the Apply Predefined Rule button, then select your Rule set file and select the Rule to apply. The Rule will create the IFC Property Set and IFC Properties.

I am wondering whether you have actually found a way to do something in ARCHICAD no one has thought of before.
In any case, great job._________________Laszlo Nagy, Moderator, Site Admin
https://twitter.com/laszlonagy
i7-2630QM 16 GB RAM
17.3" (1920x1080), NVidia GTX 460M
SSD+HDD, Win10-64 ENG
AC13-AC21 (64-bit, latest build)
Loving ARCHICAD since 1995

What I meant is that in the IFC Scheme Setup Dialog it is not possible to apply a Predefined Rule and thereby add an IFC Property Set and IFC Properties to a selected level of the IFC Type hierarchy. This can only be done manually, typing each IFC Property manually.

Actually, now that I am thinking about it, this is something that can be done using IFC Schemes. You just simply need to Clear All Scheme Settings in a new project file, then create the IFC Property Set and Properties at the desired level of the IFC type hierarchy and Export this as an IFC Scheme to an XML file. The created XML file will contain only the custom IFC Properties you have created.

Here is a sample of an XML. This XML, when merged in the IFC Scheme Setup Dialog, will create an IFC Property Group named "NL_Set" at the IfcWall level of the IFC Hierarchy, and create 3 IFC Properties as well: "MyProperty1", "MyProperty2", and "MyProperty3":

So you could create one or multiple such XML files. Whenever you need those Properties for all your Walls, you just merge the corresponding IFC Scheme XML file containing those IFC Property definitions (and their default values, if needed).
Maybe it is a good idea to have a separate IFC Scheme XML file for each separate level of the IFC type hierarchy that contains all possible IFc Properties you might need in that level (e.g. IfcWall or IfcElement). Then it is very easy to delete the ones you don't need. Much easier then adding them manually, anyway.
So this may be another thing you can consider.

Your IFC Rules XML solution is good when you need to add IFC Properties only to selected elements.
The IFC Scheme XML solution is good when you need to add IFC Properties to all elements belonging to an IFC type.

By the way, I suspect the syntax of these XML files may have been created by Graphisoft, not BuildingSMART. Maybe this is why we don't find documentation on it in the Internet.
I will ask them if this is the case and if the XML structures and possible Script commands can be made available._________________Laszlo Nagy, Moderator, Site Admin
https://twitter.com/laszlonagy
i7-2630QM 16 GB RAM
17.3" (1920x1080), NVidia GTX 460M
SSD+HDD, Win10-64 ENG
AC13-AC21 (64-bit, latest build)
Loving ARCHICAD since 1995

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum