• Login
sketchucation logo sketchucation
  • Login
⚠️ Libfredo 15.4b | Minor release with bugfixes and improvements Update

Automated Component Creation

Scheduled Pinned Locked Moved Newbie Forum
sketchup
2 Posts 2 Posters 208 Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    whit
    last edited by 7 Dec 2009, 15:36

    Does anyone have a way to create similar components from a spreadsheet or csv file? Many of the spec's are the same, would need unique names, etc?

    Any general help with exporting data in csv form needed, such as the option to change the file name each time. Is there a way to export the data and link to it from a unique Excel workbook, without opening the source file?

    ☀

    1 Reply Last reply Reply Quote 0
    • T Offline
      TIG Moderator
      last edited by 7 Dec 2009, 17:13

      See ComponentReporter++, CutList etc for examples of CSV export...
      There are also several similar tools that allow you to choose a folder/filename with UI.openPanel.
      You can insert a consistently named CSV into an Excel XLS and format it, any changes in the CSV are updated in the XLS...
      If you structure your CSV logically so that the data in each line is readable then exporting it back into another Ruby should be relatively straightforward...
      So, for example you have a face that's exported, list its corner vertex xyz positions, layer, layer_name, attributes etc etc.
      When you import it you dread it line by line, the first field of the CSV tells you its a 'face', so then you expect vertex-positions so read those, turning them into numbers with to_f, each set of three of these gives a point [x,y,z], next when you get to a field called 'layer' you know the point sets are done and the next point will be a layer-name etc etc...
      face=entities,add_face(points_array) face.layer=layer_name etc etc

      TIG

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      1 / 1
      • First post
        1/2
        Last post
      Buy SketchPlus
      Buy SUbD
      Buy WrapR
      Buy eBook
      Buy Modelur
      Buy Vertex Tools
      Buy SketchCuisine
      Buy FormFonts

      Advertisement