cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
Michal Forejt
Booster

Property of hotlinked module

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 28
MacOS 15.5
MacBook Pro M4 Pro
Setup info provided by author
1 Solution

Accepted Solutions
Xandros
Advisor

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

Go to 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
Michal Forejt
Booster

Hi,

 

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

ArchiCAD 28
MacOS 15.5
MacBook Pro M4 Pro
Xandros
Advisor

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 28
MacOS 15.5
MacBook Pro M4 Pro
Xandros
Advisor

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
Michal Forejt
Booster

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

ArchiCAD 28
MacOS 15.5
MacBook Pro M4 Pro

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!