I have been using the build box extension from JimHami42 that creates a box from a csv comma separated file. I would like to expand on it and add an attribute automatically (the name) in entity info. the text would come in from three different values sorted previously in an excel file. Would anybody know where to begin with this?
Thank you for replying to this thread, I have been using your plugin jimhami42_import_boxes.rbz extensively to import shapes from an excel list. In an effort to streamline my process I would like to figure out how to add some attributes to the box creation if possible.
Hi, sorry to jump into this after a year. I see that this topic suddenly ended and was curious about the last question.
I’m just trying the extension and had basically the same question. How to create a csv where the different blocks are separated in sketchup? Now they appear all on top of each other.
One other question: for example box,20,10,10
this will create a height of 20 , width of 10 and length of 10. However my sketchup is set in meters and for some reason it converts the data also to meters where I basically want to have a box of 20m x 10m x 10m. My box appears as H=0.51m W=0.25m L=0.25m.
Why is this happening?
If the extension code reads the input and runs it through the String#to_l, then if your CSV fields include the unit, ie "20m" instead of "20" (defaulting to inches), then you should get properly sized objects.
The CSV file would also need to supply X, Y and Z fields for the origin coordinates of the box. Then the code would need to also need to read those values and use them to position the box (either whilst it draws or as a translational transform to apply to the box group afterward.)
Thank you Dan for your quick reply always.
I have added the units as you mentioned, but that does not make any difference when importing the csv file.
example: my csv file read just 1 line
I still get a box of 0.25m x 0.13m x 0.10m
Somehow this did not do the trick and stays in inches.
Could you add a csv file with 2 boxes separated in sketchup (incl x,y,z fields)?
As a note, @DanRathbun outlines the correct way to fix this, but I hard-coded it as inches to meters since I had trouble with getting the String#to_l to work. This plugin will show up as “Import Boxes 2” on the extension menu. jimhami42_import_boxes_2.rbz (628 Bytes)