cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
2024 Technology Preview Program

2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations

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

Expression question

Red
Advocate

I am hitting roadblocks with listing a variable's value when it sometimes has one or two conditions to determine the answer. I am trying a Sequence, but I know I am laying it out incorrectly, and I can not figure it out...

 

I realize that by moving the Sequence around in order, the first one will always cancel out the remaining. What is the proper way to structure this?

 

For example (each line is a sequence):

  • IF ( AND ( Level = "1", Category = "A" ), VARIABLE, N/A)
  • IF ( AND ( Level = "1"), VARIABLE, N/A)
  • IF ( AND ( Level = "2", Category = "B" ), VARIABLE, N/A)
  • IF ( AND ( Level = "2"), VARIABLE, N/A)
Thanks,
Red
i7 8700k
ROG Strix Z390-E MoBo
64gb RAM
EVGA GeForce GTX 2080
_______________________
http://www.facebook.com/flatcreekdesignstn
http://www.sraarchitects.biz
7 REPLIES 7
poco2013
Mentor

Sequences are generally used if a evaluated attribute, in a series, may be not be applicable to all of the targeted types. In this case, you should be using a IFS instead. The return variable must be the same type for all returns.

Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27
Red
Advocate

Getting there but still have issues trying to get a LEN value for the variable...

 

IFS ( Level = "1", Catergory = "A", TRUE, VARIABLE)

 

Thanks,
Red
i7 8700k
ROG Strix Z390-E MoBo
64gb RAM
EVGA GeForce GTX 2080
_______________________
http://www.facebook.com/flatcreekdesignstn
http://www.sraarchitects.biz
poco2013
Mentor

At this point, I have no idea as to what your trying to accomplish. Suggest you review the expression help. Are you using custom properties? Also AFAIK, LEN returns a number? More specific details needed. Any returned value must match that selected in the expression type. What variable are you using, etc. ?

 

maybe??

IFS ( Home Story Number = 1, LEN("ABC") ) ==== returns 3

Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27

Thank you for the replies, I will read more into examples/help, and I will eventually get. 

Thanks,
Red
i7 8700k
ROG Strix Z390-E MoBo
64gb RAM
EVGA GeForce GTX 2080
_______________________
http://www.facebook.com/flatcreekdesignstn
http://www.sraarchitects.biz

Thinking about this again on my way to the office...

 

To be a little more detailed. The outcome can depend on 1 or 2 variables depending on the circumstance. So, I am having an issue with how to write the expression for my Reflected Ceiling Plan Legend; we have numerous levels and trays. So, to label my different ceiling heights/materials within a single room on the legend, the outcome will depend on just the material in one area and another area, the material, and the section/step of the tray; I created a property group to grab the info to specify the variables. I can understand this labeling method might be wrong or confusing to some, but I am trying to make my employer happy since he writes the checks. 😁

 

If the needed command is IFS, I am still structuring the expression wrong. I am certain I am making it harder than it should be, and overthinking it, but the light bulb hasn't turned on yet in my head. It is still warming up.

Thanks,
Red
i7 8700k
ROG Strix Z390-E MoBo
64gb RAM
EVGA GeForce GTX 2080
_______________________
http://www.facebook.com/flatcreekdesignstn
http://www.sraarchitects.biz
poco2013
Mentor

Expressions can only work with the properties of a single object to which that expression is assigned. Therefore: if you are gathering info (custom properties) from different objects in a room, you can not use a expression. You must use either the C++ add-on or a Python script. Both use manual updates. Another possibility is to create a schedule, and export all the properties to excel, do the calculations there and import back into Archicad. Although, if you you only have a few labels, just update manually?

 

Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27

Replying to this, if I understood correctly:


@poco2013 wrote:

Expressions can only work with the properties of a single object to which that expression is assigned.

 


 

The properties will be from a single object for each entry, but it could refer to complex profiled beams or slabs. It will not pull info from two different objects for a single entry. 

Thanks,
Red
i7 8700k
ROG Strix Z390-E MoBo
64gb RAM
EVGA GeForce GTX 2080
_______________________
http://www.facebook.com/flatcreekdesignstn
http://www.sraarchitects.biz