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

    Select based on Entity Info

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    8 Posts 3 Posters 99 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.
    • R Offline
      ryangarnett
      last edited by

      Hello All,

      Is there way (existing script or developing ) of saving groups of features as an individual SketchUp model based the name stored in the Entity Info (see attached jpeg). The problem I have a single model that has a number of models within it and I want to save each of the individual models as their own model, without having to do this manually.

      Thanks...


      SU_EntityInfo.jpg

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        You can save all of the Model's component definitions 'outside' using the Component Browser > Model tab and choosing the pop-out/drop-down menu's 'Save as local collection' item...
        All components are then saved as individual SKP files in the folder you specified...
        You can also use 'Save_as' on individual component's icons in the Browser [context-menu]... or even do the same on a selected instance in the Model by using the main context-menu equivalent item...
        This is the way you save parts of your Models for reuse in future projects - making coellctions of them...

        TIG

        1 Reply Last reply Reply Quote 0
        • R Offline
          ryangarnett
          last edited by

          Thank you TIG, that is really helpful. I am hoping to do this in a more automated fashion, do you know of a way to make things components? My models are not saved as components (as it is not in the workflow). Would there be a way to make all the groups into components based on the Name stored in the Entity Info?

          Thanks....

          1 Reply Last reply Reply Quote 0
          • Dave RD Offline
            Dave R
            last edited by

            Why not change the workflow to make components instead of groups? It isn't any more difficult than making groups and you can save all the components as a local collection if you wish in one step.

            Etaoin Shrdlu

            %

            (THERE'S NO PLACE LIKE)

            G28 X0.0 Y0.0 Z0.0

            M30

            %

            1 Reply Last reply Reply Quote 0
            • R Offline
              ryangarnett
              last edited by

              Because the plugins in that I am using saves them as Groups, so its out of my control.

              1 Reply Last reply Reply Quote 0
              • Dave RD Offline
                Dave R
                last edited by

                It's entirely within your control. You could easily convert the groups to components. It's a small thing to do if the things are worth saving.

                Etaoin Shrdlu

                %

                (THERE'S NO PLACE LIKE)

                G28 X0.0 Y0.0 Z0.0

                M30

                %

                1 Reply Last reply Reply Quote 0
                • TIGT Offline
                  TIG Moderator
                  last edited by

                  This one-liner copy+pasted into the Ruby Console +<enter> will make all groups currently in the model into components, using each group's name [or #1 etc if already existing]. Unnamed Groups become a component called Group#1 etc... It is one step undo-able.

                  m=Sketchup.active_model;m.start_operation('g2c'); m.definitions.each{|d|next unless d.group?;d.instances.each{|i| next unless i.valid?;n=i.name;c=i.to_component;next if n.empty?;c.name=n;c.definition.name=m.definitions.unique_name(n) } };m.commit_operation;
                  

                  BUT don't use it as an excuse for not modeling 'right' in the first place... 😒

                  TIG

                  1 Reply Last reply Reply Quote 0
                  • R Offline
                    ryangarnett
                    last edited by

                    Thanks TIG. I agree with the "right way" comment, but when you are bound by something, you are bound by it.

                    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