Dynamic .csv to cost schedule NOW AVAILABLE
Finally, when using a .csv to query a model to create a BoQ, we no longer need to
- close the BoQ
- reload the .csv file again
- REPEAT (if you have updated the .csv)
With the most recent Bonsai release you can link a .csv table to a cost schedule:
To reload the edited .csv just click on the "sync" icon in red
Truly amazing feature for those who continuously access the original .csv table to edit query, property, and BoQ structure.
A HUGE thanks to @Massimo for its implementation
If you feel like, you can donate to the Open Collective here and/or
buy Massimo a coffee here
Cheers and happy modeling (and taking off quantities)
Comments
@steverugi thanks for the hints, waiting for feedback! Cheers :-)
a little update on how useful the dynamic .csv file can be:
the reason why I removed the first two columns is to be able to add new cost items to the cost schedule and have it fully dynamic between Bonsai and .csv
Since the refresh doesn't write in the .csv it's possible to leave Excel open
This is an alternative use of Export/Import cost schedule that maintains Property and Query data for quantity takeoff
Still playing with it but it's quite promising already
Thanks Bonsai team!
HI @steverugi ,
These are great features congrats to @Massimo and everyone else that was involved in this.
I have a couple of questions/ suggestions that I would like to share with you, with respect to the 5D module of Bonsai.
Here is an example:
Say we have imported a csv schedule:

From Project Overview - Project Setup - Documents

when a CSV file is linked there could be a routine to generate also the Document Reference and populate the corresponding necessary fields from the cost schedule (I do not know whether this operation necessitates a saved IFC file with the corresponding cost schedule or if it could be generated from memory:
At this moment the export of the IfcSchedule doesnt include any querry that was used for mapping quantities or the elements that support the quantity displayed in the cost schedule (an IfcGroup maybe could be generated from the elements (if any) included/ mapped in the quantity)
I think that this workflow opens the path to roundtripping and sharing information to multiple users of the file.
Takes on this any one?
@Dimitris I think the IFC link works the same way and path+filenames are saved in a similar fashion, so in case of federated models the linked path and filename are already there I think.
good point, will get back to you on the rest of your post later
thanks
@Dimitris good points, thanks for sharing. About storing the location of the file, i think it would be a good feature. I was thinking about store the filepath in a PSet but i think the solution you have proposed (store the location as a document) would be better.
In the meantime, you could save the .blend file in order to store the location of the file because at the moment it is stored as a blender prop, but it is a momentary workaround.
About the export, i'll think about it, it seems a bit too much for my capabilities, but i'll think about it. Cheers
Hey @steverugi thank you, I'm not quite sure how linking an IFC file could work. Maybe I'm missing something. Have you tried it in files and worked?
Thanks,
Hi @Dimitris
as you suggested: it stores the path of linked models as IfcDocumentReference
IFC file wtih the links:

Bonsai:

I am refering to the storing method of linked .ifc files, maybe it can be adopted for .csv too
@Dimitris
currently we have two types of .ifc format that can work as cost schedule "importer" for Bonsai
to have this:
as you rightly pointed out once the .ifc is closed it does not save the link anywhere, maybe saving the file path as documents can solve the issue
this second option can only edit existing cost items, and if "Property" and "Query" columns are added they can recalculated quantities accordingly, to add more cost items you need to remove the first two columns "Id" and "Hierarchy"
In summary, I think, we need to
but needs to be tested
thank you for your inputs, much appreciated
Hey Steve thanks,
Yes, I think that the IfcDocumentReference is a way to go as it also aligns with potential "Level Of Information Need" as per ISO 19650, as means of storing information with respect to "Costing" Use Case.
As for the "Equation" that is also a really big feature if implemented (I do not think that it is at the moment), but I would like to ask the following if any one is aware of:
In the "Cost Template" file under the column "Property" can we use "Regex". if not then that would also be a very usefull feature.
Thank you,
@Dimitris
since Property column contains the value of the Qto pset to be used on the selected elements defined by the Query, what could be the advantage of using Regex in Property? The way I see it it's necessary for Property to be expressively unique.
Say you have a query selecting all walls of a particular type on the ground floor (like:
IfcWall, type="A-P-WAL-200", location="G1"
), you need a Property to extract the desired quantity, these are the options for Qto_WallBaseQuantities:How would a Regex be helpful? genuine question
cheers
Sure thing,
If I have an article of formworks for all vertical elements (IfcWall.SOLIDWALL, IfcColumn.COLUMN) but the Properties for these quantities are not a common name for both
for Column we have :
and for Wall we have :
So it would be great when parsing the csv file under property and querry to use the querry and loop through the "properties" mentioned matching (regex) the corresponding according to the element that is looped, thus not having to duplicate the article once for Column and once for Wall. Of course this can be extended in other similar cases.
Cheers
@Dimitris
good point
it is already possible to use multiple classes in the Query column (like 'IfcWall,IfcSlab,location = G1') but Property does not allow Regex atm
would you post a feature request? thanks
https://github.com/IfcOpenShell/IfcOpenShell/issues/6616
@Dimitris doesn't selector already support regex? Look at here https://docs.ifcopenshell.org/ifcopenshell-python/selector_syntax.html
For your example it would be something like /Net*Area/
I dont think that selector is integrated in the property name in ifc5d.csv2ifc.create_cost_items
I have tried it but doesnt function.
It need to be implemented
I confirm, the Selector works beautifully in Spreadsheet or Query, not in Property
Ah ok good to know
@Dimitris
I think an IfcCostItems cannot hold different types of quantities, only multiple quantities of the same type
but there might be another way (custom quantity set?) , who knows..
I think that the relation between an IfcCostSchedule and an IfcDocumentInformation (a document) can be done with an IfcRelAssociatesDocument relationship...there is (of course) also an useful api here https://docs.ifcopenshell.org/autoapi/ifcopenshell/api/document/assign_document/index.html
so i guess that it can be done relatively easily...
Hey @steverugi,
Thank you for the comment.
The issue is not to be of the same type but, different properties of the same type (NetSideArea and NetSurfaceArea).
As you can observe the contents of the IFCCOSTITEM stipulate IFCQUANTITYAREA, sp it seems that there is no aparent contradiction to what I propose, however I do not know whether there is a Rule restriction from the schema it self.
As I understand, at the moment prioritization is on other issues for IFCOPENSHELL