translate cvs-data to cubes?

hello,
i’m quite new to blender so this might be a dummy question but…:

is there any way to import excel data (or .cvs) into blender with measures of cubes?
my excel sheet has a line for each cube with its width, height and depth (all in mm) plus a name.
ideally i could as well import a position (another three cells with xyz-coordinates in mm) but that’s optional.

while researching this, i did find some python scripts translating cvs-data to complicated meshes but nothing really straight forward or properly documented.
is there any easy way to do this (mind: i’m quite a beginner with blender)?

thanks a lot for any help!
karl

Wow, I’m sure that’s something that has never been asked before! lol. I can’t give you a solid answer other than it is possible through scripting of course. If you have hundreds of entries you’ll probably want to go that route. Otherwise, you can do them manually. Modifying cubes through the properties panel isn’t hard. You could do the dimensions with the xyz coordinates for a single cube in about 20 seconds. Depending on the scale of your project, this might be faster than figuring out the script.

Good luck!

there is a script to read that CVS thing
but then need to add the objects cube thing
so need to modify the script to do that !

how many cubes do you have ?

do you have copy of cvs file so we can test it ?

happy bl

hello again!
thanks for your quick replies!
it’s not that many cubes per list, maybe 20 or so but the idea is to quickly try out variations: that is i modify the set in my excel and i need to import them again…
where would i find such a script (the simpler the better) and how would i use it?
thanks again!!

do you know how script with python
or have to do it for you ?

happy bl

um… naturaly i do not (know python… yet).
… er, but do i read a hint there, i maybe might not even need to?!? just in case i do, find below my cvs… ; )
and if not, where would i find some more information about this? like an example script with some documentation on how to get it into blender?
thanks a lot in advance for any help!
karl

p.s.: just in case you wonder, this is supposed to become a sideboard in the end…

my cvs is pasted below, formatting:
columns are separated by comma, alle measures are in mm.
column 1= name of element (=cube)
column 2= number of cubes i need in this size
column 3= width (x)
column 4= height (z)
column 5= depth (y)

Decke,1,2400,19,460
Seite,2,19,471,460
Tuerenteil,8,“571,75”,“223,5”,12
Boden,1,2362,19,448
Rueckwand,1,2360,450,12
Zwischenleisten_Tuer,4,“571,75”,8,10
Zwischenwand_lr,2,19,451,432
Zwischenwand_mitte_vorne,1,19,451,27
Zwischenwand_mitte_unten,1,19,220,405
Zwischenboden_lr,2,“572,25”,12,428
Zwischenboden_mitte_oben,1,“1167,5”,12,428
Auflageleisten_Zwischenboeden,6,10,10,432
Tuerabschluss_oben,4,“574,25”,12,12
Tuerabschlus_lr,2,15,450,100

for script examples
there are some included in blender file
just go to the text script editor and on bottom there is a list of templates scripts

will see if I can make small script to read file - give me a day

happy bl

http://www.pasteall.org/blend/39074
Save csv file from the Text editor next to where this blend is saved before push Run. Hope helps.

THIS WORKS GREAT!!!
THANK YOU SO MUCH, BOTH OF YOU GUYS!!!

a few notes for anyone using the script (if i’m too dumb to program, i guess i can at least provide some documentation):

  • the script needs points (.) as decimal separators and commas (,) as value separators - american system.
  • name your csv-file “parts.csv” and place it next to the script (“details.blend”).
  • add an additional (empty) first line to your csv because first line is ‘reserved for describing the content’ and gets ignored.
  • it does not use the “amount column” yet (workaround: just press shift+d to duplicate your selected cube).
  • see example csv below.

again, thank you so much for helping me with this!!!
karl

this is how your csv should look like, all measures in mm, format is: name of cube, amount (gets ignored), length (x), height (z), depth (y):

H-Decke,1,2400,19,460
H-Seite,2,19,471,460
H-Tuerenteil,8,571.75,223.5,12
Boden,1,2362,19,448
Rueckwand,1,2360,450,6
Tueren-MDF-Leiste,4,571.75,8,10
ZWand_LR,2,19,451,432
ZWand_mitte_vorne,1,19,451,27
ZWand_mitte_hinten,1,19,220,405
ZBoden_LR,2,572.25,12,428
ZBoden_mitte,1,1167.5,12,428
ZBoden-Leisten,6,10,10,432
Tuerabschluss_oben,4,574.25,12,12
Tuerabschluss_LR,2,15,450,100