sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    DC instance make unique

    Scheduled Pinned Locked Moved Developers' Forum
    22 Posts 3 Posters 622 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.
    • jolranJ Offline
      jolran
      last edited by

      That's all very interesting, and probably quite important for us new to Sketchup Ruby to understand how groups and components works.

      @unknownuser said:

      If you compare the method lists, between Group and ComponentInstance, you'll see they have nearly the same methods.
      The difference? A Group cannot be saved out to a file (directly) for use in other models, and it's easier to get at a ComponentInstance's definition, because there's an API method for it.

      I was wondering about behaviors? I noticed that if you have a face, draw a square on it and 3pl click to select. Then make a group out of that, it will behave like a cutting component onto that face. You can even unglue it if you rightclick.
      However there is no "glue_to" method for groups in the API.

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

        @jolran said:

        However there is no "glue_to" method for groups in the API.

        Right.. and you should not use a Group, for the job of a ComponentInstance.

        Groups are best used for temporary editing both manual and in scripting.

        By collecting objects together into a Group, you can:

        • move them from one edit context to another,
        • protect them from being modified by crossing edges,
        • apply a tranform to a set of objects all at once (where they move, scale or rotate all together.)

        I would say, that when you get a "set" of objects the way you want, and then wish to use that set multiple places in the model, it's best to then convert them into a ComponentInstance. Especially if your going use scripting, to manipulate them, or glue them to faces.

        I'm not here much anymore.

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

        Advertisement