sketchucation logo sketchucation
    • Login
    1. Home
    2. rubine
    3. Topics
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    R
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 5
    • Posts 11
    • Groups 1

    Topics

    • R

      Ruby interpreter

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      365 Views
      T
      I haven't tried it. Why don't you and let us know.
    • R

      Subcomponents of subcomponents

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      379 Views
      Didier BurD
      Hi, D/L TIG's Componentsreporter+ script, there are some good tricks in there
    • R

      Getting the file of a component

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      6
      0 Votes
      6 Posts
      651 Views
      TIGT
      @rubine said: do you see a chance to rebuild the "create component" with ruby? i.e. writing your own "create component" method (creating a ComponentDefinition) You can easily make and place components with ruby methods, such as. Definitionlist.add("componentdefinitionname") ComponentDefinition.entities Group.entities Group.to_component entities have lots of 'add' methods: http://download.sketchup.com/sketchuphelp/gsu6_ruby/Docs/Ruby-Entities.html#add_instance You can't 'save_as' components in current Ruby - but you can do it manually. I've discovered that in the SDK there's a kind of ...Group.SaveAs() method that would allow us to write something like a dll or a socket that could then access that function. In a script you'd have to say something like: require 'GroupExporter.so' ... GroupExporter.new(group,filepath) ... This would then save a specified group to a .skp file at a specified name/location. These kinds of variables can be got/set in earlier bits of Ruby coding... To get it to export a Component all we'd need to do is make a temporary group, that's then named after the component-definition and even with a copy of its description if any (that way the final exporter component matches the original in the model...). Then to that group's entities we add an instance of the component (and explode it inside the group?). We then use GroupExporter.new(group,filepath) and finally erase the group to tidy up. If we want it done 'silently' we can specify the filepath - say as the model's folder_path/group_name.skp - or we could prompt for a component name and/or location... All I need now is someone who can make this dll/so with the SDK - my C++ is too poor to do it...
    • R

      Load file

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      791 Views
      R
      is there also a possibility to store components automatically in a folder (as an .skp file)?
    • R

      Components

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      6
      0 Votes
      6 Posts
      794 Views
      R
      if my hierarchy of components has 3 levels, is it possible to get the hierarchy of all the components (so that one can see of which components one component consists)?
    • 1 / 1