Importing data from excel spreadsheet to BIM customized attributes

Hi,
I kindly ask if there's an easy procedure to import data from an excel sheet to a BIM model.
I'm not a LISP expert but if the only way is to compile a lisp, I will.
I don't know if before I need to make a data link and put the table also on the drawing or if I can tell to BricsCAD just to read some data from one csv file for instance.
Like a data mapping from excel to BIM attributes.

Please help me!

Comments

  • Hi,
    There is no automatic way to do this but it should be possible with Lisp. With Lisp you can read text files (export in excel as csv).
    To use bim features in LISP you need to load it in the beginning of the script
    you can use
    bim:get-property
    and
    bim:set-property
    to read and write bimproperties.

    But how would you know which property belongs to what entity?

  • @Piet said:
    Hi,
    There is no automatic way to do this but it should be possible with Lisp. With Lisp you can read text files (export in excel as csv).
    To use bim features in LISP you need to load it in the beginning of the script
    you can use
    bim:get-property
    and
    bim:set-property
    to read and write bimproperties.

    But how would you know which property belongs to what entity?

    Hi Piet, thanks for your answer. I was thinking to make customized properties before and afterwards read the values from a csv file. In case, for instance, of a spatial element like a space, I have to read/write the attributes belonging to the space number. Should be possible or I'm dreaming only?

  • Hi,
    I created a script as proof of concept a while back, it is a mix of vba and LISP,

    • it allows reading all available properties in a drawing by selecting one element.
    • Then you can create a 'template' in excel with these properties (to define which properties to import).
    • After importing you can define new properties values and write them back to Bricscad.

    It was a proof of concept and has not been optimize and is 'dirty coded', you can use it as it is. If you think it is interesting let me know and if you would add functionality I would appreciate to hear it so we can help others. Unfortunately I do not have time to put more time in it.

  • Hi Dana,
    I missed your second question. Were you able to use the above script to write the properties? Once custom properties are made you should be able to read them to excel (with empty values for the new properties but with a handle to each object and the room number). Fill in the new values in excel and write them back.