Collaborate forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Create a parameter called "IsExternal" for exterior or interior position

Maria Calogeropulos
Contributor

Hi!

We have a klient that wants to have a parameter in the ifc export that is called "IsExternal" and gives a response as "True" or "False" if the object has a position as "Exterior" or "Interior".

I have tried to do this, but I don't get how to do it. 

Can you help me?

Kind regards,

Maria

1 ACCEPTED SOLUTION

Solution

Hi Maria,

 

Did you use the "Position" parameter in the "General Parameters" Group?

You can try to copy-paste the following code into your Expression Window, see if that works (triple-click to select the whole expression).

 

IF ( {Property:CategoryPropertyDefinitionGroup/Position} = "Exterior", "True", IF ( {Property:CategoryPropertyDefinitionGroup/Position} = "Interior", "False", "Undefined" ) )

 

Another thing that may cause an issue is the separator character between values in the expression.

Depending on your operating system settings, it may be a , (comma) character or it may be a ;  (semicolon) character.

If the above Expression does not work, try to write semicolon instead of commas in the Expression.

You can actually check the expressions in one of the default expression-defined Archicad Properties.

Or you can click the "Operators & Functions" button in the Expression Editor, hover your cursor over the IF function and the little Info Tag will appear that shows the expected format of the function including the separator character that needs to be used.

....................................................................................................
Get Archicad Tips at https://twitter.com/laszlonagy
AMD Ryzen 1700X CPU, 48 GB RAM, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), WIN10 PRO ENG, AC20-AC25
Loving Archicad since 1995

View solution in original post

20 REPLIES 20

Karl Ottenstein
Moderator

Here is one possible way, assuming that the information is wanted to distinguish just objects that are either inside or outside the building...

Create a zone that covers all outside areas (patios, public spaces, etc).  Select the zone, and with the zone tool active, magic wand the outside of the building to cut a hole so that the zone only covers the external area.  Name the zone Exterior.

Then, create a new property with a property expression as shown here, which will be True if an object/element is contained in this Exterior zone and False otherwise.

Screen Shot 2022-04-22 at 4.09.25 PM.jpg

Note that the expression will not be evaluated when you simply look at an object's setings (it will read as <expression>).   But, to test, you can create a schedule and schedule this new IsExterior property to verify that it is showing the desired result.

This is all a bit new to me, so perhaps someone more experienced with property expressions has a better method.

PS The reason for cutting a hole for the building, is that various issues arise when you have overlapping zones and there will no doubt already be zones for the interior of the building.  Presumably this would be the only Exterior zone and would not overlap any other zones.

One of the forum moderators   •   AC 25 USA and earlier   •   MacOS 11.6.7, iMac Pro

I think that this ifc parameter is directly exported when you assign the external/internal parameter (by default: non defined) that is accessible out of the box for each Archicad object.

If you use one of the included ifc traductor, it should be automatic.

Laszlo Nagy
Community Admin
Community Admin

Here is how to do it:

1. Go to the IFC Translator Dialog.
2. Click the Ellipsis button (...) to the right of the Property Mapping field.
3. Create a new Preset so you will not modify the default Presets.
4. Go to the "Map IFC Properties for Export" Dialog.
5. Select "IfcElement" on the left, and click the "New" button at the bottom. Create a custom IFC Property: set its Set Name and Name ("IsExternal"), its Type is "Single Value", its Value Type is "IfcLabel".
6. Click the "New Rule" button to create a new mapping rule.
7. Click the "Add Content" button and select the "Position" General Property (it is in the "General " group. Click OK.
8. When exporting as IFC, make sure that the IFC Translator you use is using the Property Mapping Preset that you created because this custom IFC Property and its mapping Rule exists only in that Preset.

IFCExport-IsExternal.png

....................................................................................................
Get Archicad Tips at https://twitter.com/laszlonagy
AMD Ryzen 1700X CPU, 48 GB RAM, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), WIN10 PRO ENG, AC20-AC25
Loving Archicad since 1995

Thanks a lot Lazlo! We have done this, but our client wants to have this as a "true" or "false" result. So we need to override the information with a formula. We have tried this but we don't get to work. 
Can you help us with this?

Kind regards, 

Maria

Laszlo Nagy
Community Admin
Community Admin

The previous post shows how you can directly map the value of the Position parameter to a custom IFC Property.

In your case, this is not the intended result since you want the value of the "IsExternal" custom IFC Property to be "True", "False", or "Undefined", depending on the value of the "Position" Global Parameter. To do this, you can create a Property in the Property Manager with the following Expression and map that to the "IsExternal" custom IFC Property. (Make sure the Property's Data Type is "String" and it is available for all Classifications.

IFCExport-IsExternal-2.png

....................................................................................................
Get Archicad Tips at https://twitter.com/laszlonagy
AMD Ryzen 1700X CPU, 48 GB RAM, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), WIN10 PRO ENG, AC20-AC25
Loving Archicad since 1995

This works if the Position parameter has been defined properly for every object.  If an exterior object has Position set to Interior, then it will not have a True value for IsExterior.  The zone method I presented would catch that (and could even be used to audit and find errors in the value of "Position" ... but as I said earlier, it will not catch everything.  For example, an exterior light fixture in a wall niche would not be caught with the zone method.

 

EDIT: Actually, ignore my first and this post. 🙂 I'll leave them  vs delete them since it might be useful to someone to see that my zone method really doesn't work either for defining the property - or for auditing.

Given that 'exterior' objects or elements may also be on roofs, balconies, etc etc., a zone approach to automatically identify them would be unrealistic to construct - potentially a complex 3D zone that would still accidentally touch or not touch some elements.

Using the Position value that Laszlo shows does make the most sense, even though the value of Position can be wrong.  But, that value could be audited and corrected with a visual edit using a Graphic Override.

 

One of the forum moderators   •   AC 25 USA and earlier   •   MacOS 11.6.7, iMac Pro

Thanks a lot! I could try this also but it feels that I then have to make sure all the time that the zone is correctly. Don't you think? I guess Lazlos suggestion is a little bit easier...

Now I see this! I will try it! thanks a lot!

Hi Lazlo, We don't get it to work... do you know why? 

Hi Maria,

I think the problem is not with the Expression, but with the Data Type. It should be set to "String", not "True/False".

In the Expression you say that if "Position" is neither "Exterior" nor "Interior" then the value of the Property is "Undefined". However, a "True/False" Data Type Property can have the value of either "True" or "False". So if you want it to be able to be set to "Undefined" as well then you will have to set it to "String" Data Type.

From the IFC Export point of view it does not matter if this Archicad Property is "True/False" or "String" Data Type, they will both be exported as a text field in IFC.

....................................................................................................
Get Archicad Tips at https://twitter.com/laszlonagy
AMD Ryzen 1700X CPU, 48 GB RAM, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), WIN10 PRO ENG, AC20-AC25
Loving Archicad since 1995

Hi Laszio! Thank you for all the help! We still don't get it to work even if we set it to "String". Do you what the problem could be?

Thank you so much 

Skärmavbild 2022-04-25 kl. 14.21.38.png

 

Solution

Hi Maria,

 

Did you use the "Position" parameter in the "General Parameters" Group?

You can try to copy-paste the following code into your Expression Window, see if that works (triple-click to select the whole expression).

 

IF ( {Property:CategoryPropertyDefinitionGroup/Position} = "Exterior", "True", IF ( {Property:CategoryPropertyDefinitionGroup/Position} = "Interior", "False", "Undefined" ) )

 

Another thing that may cause an issue is the separator character between values in the expression.

Depending on your operating system settings, it may be a , (comma) character or it may be a ;  (semicolon) character.

If the above Expression does not work, try to write semicolon instead of commas in the Expression.

You can actually check the expressions in one of the default expression-defined Archicad Properties.

Or you can click the "Operators & Functions" button in the Expression Editor, hover your cursor over the IF function and the little Info Tag will appear that shows the expected format of the function including the separator character that needs to be used.

....................................................................................................
Get Archicad Tips at https://twitter.com/laszlonagy
AMD Ryzen 1700X CPU, 48 GB RAM, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), WIN10 PRO ENG, AC20-AC25
Loving Archicad since 1995

Thank you so much Laszlo! Changing to semicolon did the trick

@Maria_K and @Laszlo Nagy   Related to the data type, it may also be our confusion understanding what  your client wants, Maria.  Does the client want a boolean value of True or False ... or do they want a text string "True" or "False"?

Laszlo's example returned a text string.  If you want a boolean, then True and False need to be returned by the expression by typing them without the quote symbols as in my example.

One of the forum moderators   •   AC 25 USA and earlier   •   MacOS 11.6.7, iMac Pro

Laszlo Nagy
Community Admin
Community Admin

Please note that when you select an element and go to its Settings Dialog, you will see the Position parameter, the Property you created, and the custom IFC Property you created.

Since the Property is defined by an Expression, the custom IFC Property does not show its value. I don't know if it is because the value of the Property is not evaluated or for some other reason.

IFCExport-IsExternal-3.png

....................................................................................................
Get Archicad Tips at https://twitter.com/laszlonagy
AMD Ryzen 1700X CPU, 48 GB RAM, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), WIN10 PRO ENG, AC20-AC25
Loving Archicad since 1995

Laszlo Nagy
Community Admin
Community Admin

However, if you activate the IFC Project Manager Dialog you will see that the value of the custom IFC Property is evaluated and correctly displayed. (Just make sure the correct IFC Translator with the correct Property Mapping Preset is selected before entering the IFC Project Manager - remember, this custom IFC Property and its mapping exist only in that Property Mapping Preset.

IFCExport-IsExternal-4.png

....................................................................................................
Get Archicad Tips at https://twitter.com/laszlonagy
AMD Ryzen 1700X CPU, 48 GB RAM, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), WIN10 PRO ENG, AC20-AC25
Loving Archicad since 1995

Laszlo Nagy
Community Admin
Community Admin

And checking in Solibri shows that the custom IFC Property is correctly created and displays the correct value.

IFCExport-IsExternal-5.png

....................................................................................................
Get Archicad Tips at https://twitter.com/laszlonagy
AMD Ryzen 1700X CPU, 48 GB RAM, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), WIN10 PRO ENG, AC20-AC25
Loving Archicad since 1995

Laszlo Nagy
Community Admin
Community Admin

Hi Karl,

I think you and I are talking about two different things.

 

Maria talks about objects.

In Archicad, an entity you place or create is called an "element", and "Object" is an element type.

In some other CAD/BIM applications, an entity you place or create is called an "object".

 

If I understand correctly, your assumption is that when she writes "object" she means Archicad elements created with the Object Tool. And your assumption is that she wants this IFC Property to reflect whether an Object-type element is outside or inside the boundaries of the building. Your solution work well to address that scenario.

 

My assumption is that when she says "object" she means any Archicad element. And that by "Position" she means the "Position" parameter of elements available in the "Classification and Properties" panel of element settings dialogs. My posts provide a solution based on that assumption.

 

So it is now up to Maria to tell us which one was her original purpose. 😀

....................................................................................................
Get Archicad Tips at https://twitter.com/laszlonagy
AMD Ryzen 1700X CPU, 48 GB RAM, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), WIN10 PRO ENG, AC20-AC25
Loving Archicad since 1995

Maria Calogeropulos
Contributor

Hi! I meant objects as "elements", sorry about that!

Start a new conversation!

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!