Receive email notifications by changing your settings.
Click on your picture in the top right corner, go to Preferences and select your notification preferences.
Thank you for contributing to our forum!
Please keep in mind:
1. To only comment on the topic where the discussion is about. Do you have a new question or topic? Please start a new discussion.
2. Be kind to other users!

Select attributes of buildings with TQL

Hi Tygron Support,

I' d like to make a panel where I get the attribute value of buildings with a certain function (in this case a Hedendaagse Middenklas Woning). I got this far, but it doesn't seem to work:



  • Hey Ward,

    As your query is currently structured, it is doing the following:

    • Get the value of an attribute (SELECT_ATTRIBUTE)
    • Specifically, from the attribute named BAG_ID (NAME_IS_BAG_ID)
    • And it should be the attribute which is set on an area (AREA_IS)
    • And it should be the attribute which is set on a function (FUNCTION_IS_326)

    As you can already tell, the query contains a conflict, namely that your instructing the query to look at the area, but also at the function. So are you trying to look at the area's attribute or at the function's attribute?

    More importantly, however, you are trying to read the attribute BAG_ID, which is an attribute which we, by default, add to constructions when creating a new project in the Netherlands. So I think you're not trying to get the BAG_ID from the area, or from the function, but actually from a building.

    The base query to work with should be as follows: SELECT_ATTRIBUTE_WHERE_BUILDING_IS_X_AND_NAME_IS_BAG_ID.

    Judging by the rest of the query, you are trying to get the BAG_IDs of all the constructions in a given area, and with a given function. Your best option for that would be to add 2 (or more) X queries, to find whether the construction is in the AREA you are interested in, and whether the construction is of the desired function. However, depending on your exact use-case, your actual intent might be different, allowing for a route with fewer queries.

    If you could give some additional context on what you are trying to achieve, I or other members of the community might be able to provide some additional feedback or ideas.

    Kind regards.

  • Hi Rudolf,

    I used the BAGID as an example. In fact it is about an attribute we want to add to certain buildingstypes. So, let's say I want to give the buildingtype Hedendaagse Middenklas Woning a attribute WOAW and a attribute value of 1. All the buildingtype Speeltuin (208) will get a WOAW attribute with a value of 5. For a certain area I now want to see how this area scores on my invented WOAW-scale. Let say there are 5 buildings with buildingtype Hedendaagse Middenklas Woning and one Speeltuin in my area. The score should be 10 (5*1 + 5).

    I like your sollution where I use multiple queries. I'll look into it.

  • Depending on what "WOAW" represents, is it really necessary to count individual constructions? Or would it also be possible to base the results on the lotsize/floorsize of the resulting constructions? Because it that's possible, the resulting logic might be greatly simplified, and would also allow for constructions to be added or removed during a session/testrun.

  • No, it has to be the specific attribute value of an individual construction. So, yes. I'll see what is possible by combining some queries.

Sign In or Register to comment.