OSArch Community

Using Decimal in Selector Syntax

  1. A

    Hi everyone,

    When I try to search the query:

    Qto_WallBaseQuantities.Width=0.1

    I get the error:

    ...

    Qto_WallBaseQuantities.Width=0.1

    __^

    Expected one of:

    • PLUS
    • COMMA

    I tried adding escape characters but it didn't work, either. Is there a way I can get this working?

  2. B

    I hadn't tested but try type "0,1" instead of "0.1". Strange behaviour

  3. A

    @Bimlooser said:

    I hadn't tested but try type "0,1" instead of "0.1". Strange behaviour

    I guess comma is reserved for concatenating multiple conditions. When I do that it says:

    Unexpected end-of-input. Expected one of:

       * DOT
  4. A

    @theoryshaw thanks, that worked perfectly. I didn't even need to do double conditions, widths are just round numbers in the project.

    For anyone wondering how to add this to a cost schedule template, you need to add double quotes like this:

    ""Qto_WallBaseQuantities"".""Width"" = ""0.1""

  5. T

    There's probably a better way to do this, but the following works. It accounts for Blender not really returning exactly 0.1

    
    IfcElement, "Qto_WallBaseQuantities"."Width" >= "0.0999", "Qto_WallBaseQuantities"."Width" <= "0.1001"
    

  6. S

    @atomkarinca said:

    @theoryshaw thanks, that worked perfectly. I didn't even need to do double conditions, widths are just round numbers in the project.

    For anyone wondering how to add this to a cost schedule template, you need to add double quotes like this:

    ""Qto_WallBaseQuantities"".""Width"" = ""0.1""

    I don't think you need to double quote it

    IfcWall, "Qto_WallBaseQuantities"."Width" < ".101" works just fine (for 100mm walls in my project)

    cheers

  7. A

    @steverugi i meant when you want to make a template and import it as a cost schedule, you need to have the query inside quotes. for instance:

    Hierarchy,Identification,Name,Unit,Property,Query

    5,XX,100mm wall,unit,NetSideArea,"IfcWall, PredefinedType=STANDARD, ""Qto_WallBaseQuantities"".""Width"" = ""0.1"""

  8. S

    Hi @atomkarinca

    @steverugi i meant when you want to make a template and import it as a cost schedule, you need to have the query inside quotes. for instance:

    Hierarchy,Identification,Name,Unit,Property,Query

    5,XX,100mm wall,unit,NetSideArea,"IfcWall, PredefinedType=STANDARD, ""Qto_WallBaseQuantities"".""Width"" = ""0.1"""

    the following two queries in my .csv file used to import a cost schedule

    produce the same result:

    well, at least on my 2 laptops :)

    cheers

    PS as a general rule, what is good for the Search in "Grouping and Filtering" or Spreadsheet Import/Export can be used in the Query column in the .csv to import a cost schedule, after all they all use the same 'Selector' (to the best of my knowledge)

  9. A

    @steverugi sorry, i was purely talking about writing csv in a text editor. when you create it in a spreadsheet editor, it will already format it accordingly.

  10. S

    @atomkarinca said:

    @steverugi sorry, i was purely talking about writing csv in a text editor. when you create it in a spreadsheet editor, it will already format it accordingly.

    sure, no problem

    For those who are not too familiar with the subject, in Bonsai you can create a .csv table where elements can be grouped in a hierarchical structure and according to some particular criteria (i.e. class, location, type..) and their common quantity can be extracted and used in a cost schedule, or they can be just exported as table with Spreadsheet Import/Export using the same query.

    What I showed above is from the actual .csv file I use as template and adjust according to my needs

    cheers

Login or Register to reply.