Is there a clever way to not include a type in a schedule if there's no instance in the project?

Is there a clever way to not include a type in a schedule if there's no instance in the project?

walpa

Comments

  • edited May 21

    Can you attach the example file to test?

  • Maybe something like this? Since the grouping is done after the query, the type.count will be 1 for all IfcDoors instanciated

    Cheers

    theoryshaw
  • You can just keep the CSV attribute for count. I think in your recording t was removed.

    Attached the saved query
    Cheers!

    theoryshaw
  • Looking to the "Query" filter. Currently it has a structure of two fields that set query = value.

    Should not be better to have something similar to the "Property" filter allowing to select the comparison operator?

    Example:

    Here a possible PR for that.
    https://github.com/IfcOpenShell/IfcOpenShell/pull/6734

    Cheers!

  • edited May 22

    Hi @theoryshaw

    Is there a clever way to not include a type in a schedule if there's no instance in the project?

    try using count, not 'type.count'

    cheers

  • If you are grouping in type.Name it is true that sum on count or type.count will provide the same results except for the IfcDoors without type.

    In the case of doors without type, "count" will provide the number of doors without type while "type.count" will provide NULL. I do not know if type.count should provide NULL instead o 0 for that case. Anyhow you can change the NULL to 0 in the settings
    But if you want to get rid of the NULL type I think still you need to run the query with type.Name
    Cheers

  • @steverugi spreadsheet master!
    Taking advantage of the occasion, how do I make this query return a filtered value? For example: sum of count > 1.0
    Thanks

  • Thanks! got it...

    ...

    try using count, not 'type.count'

    This didn't work for me.

  • @theoryshaw

    try using count, not 'type.count'

    This didn't work for me.

    I haven't checked it but I think count needs to be immediately after type.Name

  • @walpa
    thanks

    Taking advantage of the occasion, how do I make this query return a filtered value? For example: sum of count > 1.0

    I don't think there is a way atm, it would make a useful feature request

  • @walpa and @steverugi I think so as well. Please find below the PR above updated to have "Output Filters" What it does is that the output of the previous step is passed over filters (both regex and comparison are possible). Within a group the filters are applied sequentially. Between blocks the filters are applied as OR (removing duplicates).

    PR: Added Output filters to spreadsheet export & comparison list to "Query" filter #6734
    @theoryshaw With "output filters" I think is generally easier to filter what it is required on the output. Moreover one can benefit of the calculations done by the grouping mechanism before to further filter based on grouped data.
    So basically this allows to have a three step process:

    1. (Add Search Group) Filters to do the QUERY that will select the elements one is interested
    2. (Add CSV Attribute) To select the relevant data from the previous selected elements and generate grouped information
    3. (Add Output Filter Group) To filter the output from the previous step (allowing to define several OR blocks and sequential filtering within the block. The filters both for comparison within a column or regex for column or all columns)
    Cheers!

    theoryshawwalpaMassimo
  • Thank you @falken10vdl
    Wonderful! I can't wait to try it!

  • @walpa :)
    You can install the IDE and test it already if you want ;)
    https://docs-unstable.bonsaibim.org/quickstart/ide/index.html
    Step 15.
    Cheers!

Sign In or Register to comment.