sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    πŸ«› Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download

    Help inserting a skp into a model.

    Scheduled Pinned Locked Moved Developers' Forum
    6 Posts 3 Posters 270 Views 3 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.
    • honoluludesktopH Offline
      honoluludesktop
      last edited by

      The only method I have found to import a skp into my model is model.import "my_file_name.skp". However, this method places the import on the tip of my pointer, not in the model. How do I import a skp, to a specific point in the model independently of a pointing device?

      If I can import the skp as a definition, or instance to the model, then I could do something like definition.insertion_point=Geom::Point3d.new(x,y,z). But I have not figured out how to do that. Any ideas?

      1 Reply Last reply Reply Quote 0
      • Dan RathbunD Offline
        Dan Rathbun
        last edited by

        try Entities.add_instance

        I'm not here much anymore.

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          Entites.add_instance requires the instance to exist.
          What you want to use is model.definitions.load
          http://code.google.com/intl/no/apis/sketchup/docs/ourdoc/definitionlist.html#load

          Then you can use model.active_entities.add_instance

          Thomas Thomassen β€” SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          1 Reply Last reply Reply Quote 0
          • Dan RathbunD Offline
            Dan Rathbun
            last edited by

            Yes and the code example under Entities.add_instancehas all that.

            I'm not here much anymore.

            1 Reply Last reply Reply Quote 0
            • thomthomT Offline
              thomthom
              last edited by

              Gotcha - didn't notice that.

              Thomas Thomassen β€” SketchUp Monkey & Coding addict
              List of my plugins and link to the CookieWare fund

              1 Reply Last reply Reply Quote 0
              • honoluludesktopH Offline
                honoluludesktop
                last edited by

                Thanks guys.

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

                Advertisement