Deep nest

Deep nest

Postby kachupp » Sat Jan 26, 2013 11:31 pm

Looking for a plugin that has a; ONE click exit from a deeply nested component preferably “right click context menu” Any tool exist?
0
User avatar
kachupp 
 

Re: Deep nest

Postby Dave R » Sun Jan 27, 2013 1:40 am

Have you tried using the Outliner?
0
Etaoin Shrdlu


%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: Deep nest

Postby kachupp » Sun Jan 27, 2013 2:06 am

Dave R wrote:Have you tried using the Outliner?


Never thought of using it.. it works. I'd still prefer right click exit :thumb:
0
User avatar
kachupp 
 

Re: Deep nest

Postby Jim » Sun Jan 27, 2013 4:55 am

Paste this into a file with the .rb extension in your plugins folder.

Code: Select all
UI.add_context_menu_handler {|menu|
  menu.add_item("Close All Contexts") {
    Sketchup.active_model.selection.clear
    while (Sketchup.active_model.close_active); end
  }
}
1
Hi

Jim 
Global Moderator
 

Re: Deep nest

Postby kachupp » Sun Jan 27, 2013 9:52 am

Perfect Jim thank you very much
0
User avatar
kachupp 
 

Re: Deep nest

Postby irwanwr » Sun Jan 27, 2013 11:08 pm

[Plugin] Deep Nested Escape? :P
0
User avatar
irwanwr 
 

Re: Deep nest

Postby halroach » Sun Jul 21, 2013 10:00 am

Nice!
I am unable to assign a keyboard shortcut to it. How can I do it?
0
User avatar
halroach 
 

Re: Deep nest

Postby massimo » Sun Jul 21, 2013 10:05 am

You'll find it in the context menu: right click-->Close All Contexts
0
User avatar
massimo 
 

Re: Deep nest

Postby Dave R » Sun Jul 21, 2013 10:18 am

Since it is in the Context menu, you need to have something selected such that there'd be a Context menu entry for the plugin. Open a component or group within a nest and select an edge or face. It'll then be available for setting the shortcut.

close.PNG
0
Etaoin Shrdlu


%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: Deep nest

Postby halroach » Sun Jul 21, 2013 10:42 am

Dave R wrote:Since it is in the Context menu, you need to have something selected such that there'd be a Context menu entry for the plugin. Open a component or group within a nest and select an edge or face. It'll then be available for setting the shortcut.

close.PNG


Right!! thanks!!!
Excellent!!! :thumb: :thumb:
0
User avatar
halroach 
 

Re: Deep nest

Postby massimo » Sun Jul 21, 2013 10:49 am

Not so easy I'm afraid, but i might be wrong. It will work only depending on what you have selected when you assigned the shortcut and not in any situation and at any "level" of selection like the "normal" right click does.
0
User avatar
massimo 
 

Re: Deep nest

Postby Dave R » Sun Jul 21, 2013 11:04 am

Massimo, you're right. However the plugin isn't available to select from the Function list unless an entity within a component is selected. It doesn't have to be a face within an inner component. It could be a component that is selected. Unless an entity is selected, though, the keyboard shortcut won't work. Weird.
0
Etaoin Shrdlu


%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: Deep nest

Postby Bob James » Sat Mar 22, 2014 11:25 am

Jim wrote:Paste this into a file with the .rb extension in your plugins folder.

Code: Select all
UI.add_context_menu_handler {|menu|
  menu.add_item("Close All Contexts") {
    Sketchup.active_model.selection.clear
    while (Sketchup.active_model.close_active); end
  }
}

Called it BackOut.rb, assigned a shortcut to it, added it to a key on my P.I. Engineering x-keys keyboard and now I can back out from within any group/component with one key. Sure beats pecking at the Escape key :D
Thank you very much :thumb:
0
i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60
User avatar
Bob James 
Premium Member
Premium Member
 

Re: Deep nest

Postby Jim » Sat Mar 22, 2014 11:42 am

You're welcome.

I will be adding 2 commands to Custom Toolbars named "CloseActive" and "CloseAllActive" for those who like toolbar buttons.
1
Hi

Jim 
Global Moderator
 

Re: Deep nest

Postby Jim » Sat Mar 22, 2014 11:49 am

Bob, I could put "BackOut.rb" in the Plugin Store, if that would be alright with you.

Although I wonder if it's worth it for what is practically a one-liner; but I suppose code size isn't always related to usefulness.
0
Hi

Jim 
Global Moderator
 

Re: Deep nest

Postby kaas » Sat Mar 22, 2014 12:56 pm

Jim wrote:Paste this into a file with the .rb extension in your plugins folder.

Code: Select all
UI.add_context_menu_handler {|menu|
  menu.add_item("Close All Contexts") {
    Sketchup.active_model.selection.clear
    while (Sketchup.active_model.close_active); end
  }
}

Thanks a lot! Those few lines of code make working with more complex object trees much easier.
0

kaas 
 

Re: Deep nest

Postby tt_su » Sat Mar 22, 2014 3:14 pm

kaas wrote:Thanks a lot! Those few lines of code make working with more complex object trees much easier.

The Outliner will let you jump directly in and out of the model hierarchy.
0
User avatar
tt_su 
SketchUp Team
SketchUp Team
 

Re: Deep nest

Postby kaas » Sat Mar 22, 2014 3:34 pm

tt_su wrote:The Outliner will let you jump directly in and out of the model hierarchy.

I know, I use it all the time but using a keypress is a bit more quick than moving the pen to the outliner and back again.
0

kaas 
 

Re: Deep nest

Postby Bob James » Sat Mar 22, 2014 11:10 pm

Jim wrote:Bob, I could put "BackOut.rb" in the Plugin Store, if that would be alright with you.

It's your plugin, all I did was give it a name :D
Jim wrote:Although I wonder if it's worth it for what is practically a one-liner; but I suppose code size isn't always related to usefulness.

This one is worth it
0
i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60
User avatar
Bob James 
Premium Member
Premium Member
 

Re: Deep nest

Postby Krisidious » Thu Nov 06, 2014 10:43 am

looked for this in the plugin store... didn't find it. needs to be there. doesn't seem to work in 2015?
0
By: Kristoff Rand
Home Designer
Unique House Plans
User avatar
Krisidious 
 

Re: Deep nest

Postby Box » Thu Nov 06, 2014 11:10 am

Works fine for me in 2015
0
User avatar
Box 
 

Re: Deep nest

Postby Dave R » Thu Nov 06, 2014 11:20 am

It does for me, too.
0
Etaoin Shrdlu


%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: Deep nest

Postby Krisidious » Thu Nov 06, 2014 11:22 am

Hmmm...
0
By: Kristoff Rand
Home Designer
Unique House Plans
User avatar
Krisidious 
 

Re: Deep nest

Postby Krisidious » Thu Nov 06, 2014 11:23 am

Did you save the rb or make one yourself?

That was it... I made the rb last time and this time I downloaded it. it's called backout now instead of close all contexts as I'm used to.

Thanks guys.
0
By: Kristoff Rand
Home Designer
Unique House Plans
User avatar
Krisidious 
 

Re: Deep nest

Postby Dave R » Thu Nov 06, 2014 11:37 am

You could easily edit the text to say that again.
0
Etaoin Shrdlu


%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: Deep nest

Postby Krisidious » Thu Nov 06, 2014 11:39 am

I have... I named it GTFO!
0
By: Kristoff Rand
Home Designer
Unique House Plans
User avatar
Krisidious 
 

Re: Deep nest

Postby pbacot » Thu Nov 06, 2014 5:13 pm

Wow this is just what I was asking for just the other week, but no one who answered seemed to remember it. Maybe it is just my machine but backing out of components is a PITA. So slow sometimes.

Thanks guys for creating and posting this!

Now for the opposite (key command)+click on an entity inside a component to open (edit) that entity's component (/group) to raw geometry level.
0
MacOSX MojaveSketchUp Pro v19 Twilight v2 Thea v3 PowerCADD
User avatar
pbacot 
Top SketchUcator
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Plugins

Who is online

Users browsing this forum: arw57, darospa, Google Bot and 15 guests