• Login
sketchucation logo sketchucation
  • Login
ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

How to save a component definition

Scheduled Pinned Locked Moved Developers' Forum
6 Posts 3 Posters 1.5k Views
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.
  • A Offline
    Al Hart
    last edited by 19 Feb 2008, 23:36

    How to create and save a component in an active SketchUp model.

    I would like to create a component with a Ruby file, (which I am able to do), and then save just the component definition to disk (which I don't know how to do).

    I'm sure I have asked this before, but I can't find a record of it on the SUC Forum.

    Any ideas? (And I don't want the user to have to save it by hand)

    Al Hart

    http://wiki.renderplus.com/images/e/ef/Render_plus_colored30x30%29.PNG
    IRender nXt from Render Plus

    1 Reply Last reply Reply Quote 0
    • T Offline
      todd burch
      last edited by 21 Feb 2008, 01:26

      There are a couple methods to leverage here.

      Sketchup.active_model.save() will save a model to disk.

      Now, if you are on a Mac, Skechup.file_new() with create another instance of Sketchup. You'll get a second window, then you can switch around your high level qualifier to switch between views, build your component there, save it, whatever.

      Is this the type of info you were looking for?

      1 Reply Last reply Reply Quote 0
      • A Offline
        Al Hart
        last edited by 21 Feb 2008, 02:02

        No Todd,

        I want to create a SketchUp Component (say a furniture item), while the user is working on a larger layout, and then save the new component if a library so the next time the user needs it I don't have to create it again.

        We did find the SDK code which lets you write a .SKP file directly, and then load it as a component, so we will try that route.

        Al Hart

        http://wiki.renderplus.com/images/e/ef/Render_plus_colored30x30%29.PNG
        IRender nXt from Render Plus

        1 Reply Last reply Reply Quote 0
        • A Offline
          Al Hart
          last edited by 21 Feb 2008, 02:03

          On a similar note, I thought there was a way to create an SKP file, using the SDK from
          outside of SketchUp. I even thought we had tried it once.

          But today I can't find it.

          Does anyone know if it is possible to create an SKP file in a stand
          alone program using the SDK.

          (We regularly do this by creating a .rb file and then reading it, but
          we would like to create a .SKP file directly.)

          Al Hart

          http://wiki.renderplus.com/images/e/ef/Render_plus_colored30x30%29.PNG
          IRender nXt from Render Plus

          1 Reply Last reply Reply Quote 0
          • T Offline
            TIG Moderator
            last edited by 21 Feb 2008, 08:10

            Or put another way - you want a method something like:

            ComponentDefinition.export

            or

            ComponentDefinition.save_as

            ...

            TIG

            1 Reply Last reply Reply Quote 0
            • A Offline
              Al Hart
              last edited by 21 Feb 2008, 14:40

              Yes.

              @tig said:

              Or put another way - you want a method something like:

              ComponentDefinition.export

              or

              ComponentDefinition.save_as

              ...

              Al Hart

              http://wiki.renderplus.com/images/e/ef/Render_plus_colored30x30%29.PNG
              IRender nXt from Render Plus

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

              Advertisement