Project data & BIM
About BIM-based management of attributes, schedules, templates, favorites, hotlinks, projects in general, quality assurance, etc.
SOLVED!

Property of hotlinked module

Michal Forejt
Booster

Hi,

 

I have trouble with expressions. I would like to use expression, which tests, whether object is part of module.

 

I have some objects (e.g. sink) tahat are part of hotlinked module. This module has ID which corresponds to building ID (e.g. Building 01). Then I have some objects, that are not part of hotlinked module and they have property (BuildingID) which we manually fill out. And what I need to do is to have another property (e.g. BuildingIDschedule) which I can put into schedules. This property would be either "BuildingID" or "ModuleID" . 

 

Simply:

 

IF "object is part of hotlinked module"; moduleID; BuildingID

 

Whatever I try I get undefined either for objects that are part of module or for the objects that are not.

 

Thank you

 

Operating system used: Windows

ArchiCAD 27
WIN 11
AMD Ryzen 5 7600X 6-core
64 GB RAM
NVIDIA GeForce RTX 3060
1 ACCEPTED SOLUTION

Accepted Solutions
Solution

One approach I'd try:

IF ( OR(ID modulu = "A"; ID modulu = "B"; ID modulu = "C"; ID modulu = "D"; ID modulu = "E"; ID modulu = "F"); ID modulu; SEKCE VOLBA )

→ the usage of OR(condition1; condition2; ....; conditionN) simplifies the conditions you tried

 

 

another one to make the expression even easier:

IF ( ID modulu <> ""; ID modulu; SEKCE VOLBA )

ID modulu <> "" → means if ID modulu is not empty (there's a difference between the value being empty or being undefined)

with this type of writing the condition there's no need to specify what exactly is written in IDmodulu. As long there is some value in there it will use IDmodulu as a result.

ArchiCAD 27 GER / Win10
Intel i9-9900K / 64GB RAM / nVidia GeForce RTX 2080 Ti

View solution in original post

6 REPLIES 6
Xandros
Advisor

Hi,

I'd suggest to check the following:

  • is the property visible to all classifications that you intend it to be?
  • is the property exported from your main file to your hotlink module?
ArchiCAD 27 GER / Win10
Intel i9-9900K / 64GB RAM / nVidia GeForce RTX 2080 Ti

Hi,

 

module is exported from the same file and property is set to be visible to all classifications. Objects are all properly classified.

ArchiCAD 27
WIN 11
AMD Ryzen 5 7600X 6-core
64 GB RAM
NVIDIA GeForce RTX 3060

I tried reproducing the error, but for me it worked like intended. Maybe you can share a few screenshots:

  1. property-manager with the faulty expression
  2. hotlink module settings of your mentioned sink
ArchiCAD 27 GER / Win10
Intel i9-9900K / 64GB RAM / nVidia GeForce RTX 2080 Ti
Michal Forejt
Booster

As a workaround I used following expression:

 

#SEKCE
IFS ( ID modulu = "A"; ID modulu; ID modulu = "B"; ID modulu; ID modulu = "C"; ID modulu; ID modulu = "D"; ID modulu; ID modulu = "E"; ID modulu; ID modulu = "F"; ID modulu; ID modulu = ""; SEKCE VOLBA )

This works as we use only 6 unique IDs for our modules (6 buildings - A, B, ...F). So in case object has any of the module IDs it returns Module ID (as building identification), otherwise it returns "SEKCE VOLBA" which is manually set up by us (Again A, B, ...F).

 

But what I was originally trying was this:

On printscreen you can see that #SEKCE works, but #SEKCE 1S doesn't work:

IF ( ISUNDEFINED ( ID modulu) ; SEKCE VOLBA; ID modulu )

Snímek obrazovky 2024-07-26 120935.png

This doesn't work either:

IF ( ISUNDEFINED ( ID modulu) ; ID modulu ; SEKCE VOLBA)

Snímek obrazovky 2024-07-26 121402.png

 

ArchiCAD 27
WIN 11
AMD Ryzen 5 7600X 6-core
64 GB RAM
NVIDIA GeForce RTX 3060
Solution

One approach I'd try:

IF ( OR(ID modulu = "A"; ID modulu = "B"; ID modulu = "C"; ID modulu = "D"; ID modulu = "E"; ID modulu = "F"); ID modulu; SEKCE VOLBA )

→ the usage of OR(condition1; condition2; ....; conditionN) simplifies the conditions you tried

 

 

another one to make the expression even easier:

IF ( ID modulu <> ""; ID modulu; SEKCE VOLBA )

ID modulu <> "" → means if ID modulu is not empty (there's a difference between the value being empty or being undefined)

with this type of writing the condition there's no need to specify what exactly is written in IDmodulu. As long there is some value in there it will use IDmodulu as a result.

ArchiCAD 27 GER / Win10
Intel i9-9900K / 64GB RAM / nVidia GeForce RTX 2080 Ti

Thanks a lot. This is great. I have never seen usage of this <> - that is my little game changer with AC expressions 🙂

ArchiCAD 27
WIN 11
AMD Ryzen 5 7600X 6-core
64 GB RAM
NVIDIA GeForce RTX 3060

Setup info provided by author