Page 1 of 1

hide planes & sketch in assembly

Posted: Thu Oct 21, 2021 9:34 am
by HDS
I am working in an assembly with a team of others. Sometimes we forget to turn off the planes and sketches before checking parts in. Is there an easy way to select all of the sketches, or planes, or surfaces and hide them? I don't want to use "hide all types" because there are planes and sketches that I will show to work. I tried selection filters but they didn't do anything.

Re: hide planes & sketch in assembly

Posted: Thu Oct 21, 2021 9:40 am
by Glenn Schroeder
So you want to hide some planes, sketches, etc, but not all? In that case, as far as I know your best option would be to set up display states, with the desired stuff either hidden or shown, as needed. Then it's pretty simple to switch back and forth between the different display states.

Re: hide planes & sketch in assembly

Posted: Thu Oct 21, 2021 9:49 am
by kawuser
Have you tried this?

Re: hide planes & sketch in assembly

Posted: Thu Oct 21, 2021 10:08 am
by SPerman
I think he is asking for a way to select sketches across multiple parts so they can be hidden, without selecting each one individually.

Re: hide planes & sketch in assembly

Posted: Thu Oct 21, 2021 10:15 am
by kawuser
You could write a macro to turn off sketchs, axes, planes etc.

Re: hide planes & sketch in assembly

Posted: Thu Oct 21, 2021 10:28 am
by Tom G
Glenn Schroeder wrote: Thu Oct 21, 2021 9:40 am So you want to hide some planes, sketches, etc, but not all? In that case, as far as I know your best option would be to set up display states, with the desired stuff either hidden or shown, as needed. Then it's pretty simple to switch back and forth between the different display states.
I've gotten to understand display states better lately. While I have some clean, as-intended for a drawing/assembly/3DPDF-export purpose, display states, I have begun to also create a Working display state where anything goes because I'm friggin' doing something here and I don't need all that other stuff in my way. While I currently work in a 1-user setup, once we get another, I'd put my own initials into the name of the Working display state, and require other user to do the same: You do what you do and I'll do what I do, but do it in your own display state and leave the clean one for common use by all.

Just an idea. I'm open to learning unexpected consequences.

Re: hide planes & sketch in assembly

Posted: Thu Oct 21, 2021 10:36 am
by HDS
Kawuser

That works to hide them all. However, I want to hide them all then then show the 3 or 4 planes and sketches I need. THANKS for the macro but it seems to do the same thing as the "hide all types" menu.

Glen

I just tested display states but if I used it correctly it does not hide or show planes.

If there is a trick to select all the planes in the model then hide them that would work for me. Filtering the tree for plane at least lets me see all of them then turn them off hide them one at a time. This is very tedious though.

Re: hide planes & sketch in assembly

Posted: Thu Oct 21, 2021 10:44 am
by Glenn Schroeder
HDS wrote: Thu Oct 21, 2021 10:36 am
Glen

I just tested display states but if I used it correctly it does not hide or show planes.

If there is a trick to select all the planes in the model then hide them that would work for me. Filtering the tree for plane at least lets me see all of them then turn them off hide them one at a time. This is very tedious though.
It works fine for me. See the screenshots below. I created a new display state and set the Plane to show. When I switched back to the original display state the plane doesn't show. Maybe I wasn't clear though. You need to have manually hide or show the planes, sketches, etc in each display state. That won't happen automatically.

image.png
image.png

Re: hide planes & sketch in assembly

Posted: Thu Oct 21, 2021 10:52 am
by Tom G
Here's what I thought:
Aren't all my Sketches named (Purpose) SketchXX? Use Tree Filter to show these.

Here's what I got:
I put Sketch into the Tree Filter, and it only showed the folders, components, features, and expanded sketches *of TOOLBOX Parts*. Every other component present sure has Sketches named Sketch there as well. Unfortunately this idea is a dead end.

EXCEPT!!
I tried it again. A majority of my piping components, by standard, contain a 3D Sketch named Weldment 3DSketch. Also, my virtual weldment components always have a 3D Sketch. So I entered "3DSketch" into the Tree Filter and indeed I got all of these displayed with less other in between. It doesn't one-click and you're done, nor even selection-filter window-select and hide, but it does condense the tree to show all my 3D Sketches, regardless of if it was named "3DSketch1" or "Weldment 3DSketch" or "NPT Weldment 3DSketch" or "Nozzle 6in offset 3DSketch1".

So, tree filter helps accomplish this ONLY for 3D Sketches. o[ Good luck.

Re: hide planes & sketch in assembly

Posted: Thu Oct 21, 2021 10:55 am
by Tom G
Glenn Schroeder wrote: Thu Oct 21, 2021 10:44 am You need to have manually hide or show the planes, sketches, etc in each display state. That won't happen automatically.
I agree with Glenn. Display States are a method for preventing your issue by either returning to the past and doing previous work differently, or changing patterns of behavior across future time to achieve better results. Neither of these options directly achieve what you ask for: to click a button and get something done nicely now.

Re: hide planes & sketch in assembly

Posted: Thu Oct 21, 2021 10:55 am
by JSculley
Glenn Schroeder wrote: Thu Oct 21, 2021 10:44 am It works fine for me. See the screenshots below. I created a new display state and set the Plane to show. When I switched back to the original display state the plane doesn't show. Maybe I wasn't clear though. You need to have manually hide or show the planes, sketches, etc in each display state. That won't happen automatically.


image.png


image.png
I think the issue @HDS is having is in the assembly. You can't control the visibility of planes in a part using display states in an assembly.

Re: hide planes & sketch in assembly

Posted: Thu Oct 21, 2021 10:59 am
by Ömür Tokman
Glenn Schroeder wrote: Thu Oct 21, 2021 10:44 am That won't happen automatically.
Yes it won't be automatic, because you don't hide all, the software can't figure out which to hide.

But if the names of the elements that need to be hidden start with "hide" (hide-plane1 , hide-sketch1) I think a macro can be written, like hide if the element name contains the word "hide". If you do this often, you should use the word "hide" for the assemblies you will create from now on.


Add: can you collect the elements you want to hide in a folder and suppress them?

Re: hide planes & sketch in assembly

Posted: Thu Oct 21, 2021 11:15 am
by Tom G
JSculley wrote: Thu Oct 21, 2021 10:55 am I think the issue @HDS is having is in the assembly. You can't control the visibility of planes in a part using display states in an assembly.
We digress, and obfuscate by not including context within each suggestion and answer. Isn't there a lovely FAQ about display states? IDK.

I am able to control the active display state of a component (such as hide THIS sketch here), save that component, and when I return to the assembly that sketch is hidden while others are shown. It is a layered structure. Control the parts and you will have them show nicely when in assembly. Control the varied displays you want in the assembly to have them show nicely in drawings or exports. They can be useful in direct context, but are more useful to reference in downstream applications.

OTOH, your assembly display states can control those entities but only with the same tedium as manual fussing.

That's why I think that it's something you can adopt into parts so that you have planned ahead for its use in the assembly. This does not in any way help you now that you are already in the assembly unless you want to add extra work to go back and alter your components themselves.

To be more specific, you can select and control the Referenced Display State of a component within its Component Properties. This does not go back and create component display states for you here, but it does allow you to leverage the decisions you have already made in the past.
My component in assembly shows up as: FILENAME<#> (CONFIGURATION<DISPLAYSTATE>)
You can choose what you've already made to use where you are. It doesn't reference what you haven't already differentiated.

Re: hide planes & sketch in assembly

Posted: Thu Oct 21, 2021 11:37 am
by Glenn Schroeder
Tom G wrote: Thu Oct 21, 2021 11:15 am We digress, and obfuscate by not including context within each suggestion and answer. Isn't there a lovely FAQ about display states? IDK.

I am able to control the active display state of a component (such as hide THIS sketch here), save that component, and when I return to the assembly that sketch is hidden while others are shown. It is a layered structure. Control the parts and you will have them show nicely when in assembly. Control the varied displays you want in the assembly to have them show nicely in drawings or exports. They can be useful in direct context, but are more useful to reference in downstream applications.

OTOH, your assembly display states can control those entities but only with the same tedium as manual fussing.

That's why I think that it's something you can adopt into parts so that you have planned ahead for its use in the assembly. This does not in any way help you now that you are already in the assembly unless you want to add extra work to go back and alter your components themselves.

To be more specific, you can select and control the Referenced Display State of a component within its Component Properties. This does not go back and create component display states for you here, but it does allow you to leverage the decisions you have already made in the past.
My component in assembly shows up as: FILENAME<#> (CONFIGURATION<DISPLAYSTATE>)
You can choose what you've already made to use where you are. It doesn't reference what you haven't already differentiated.
There was one, once upon a time.

Re: hide planes & sketch in assembly

Posted: Thu Oct 21, 2021 12:10 pm
by HDS
A simpler change to practice would be for us to turn off all planes and sketches before checking in. That is something that display states could help with.

I was hoping for a simple way for me to do this for myself. Until someone shares a better idea I will have to filter the tree and look for the stuff that is shown. This is tedious but easier than changing the way everyone works.

I wish that surface was an option in "hide all types".

Re: hide planes & sketch in assembly

Posted: Thu Oct 21, 2021 7:58 pm
by Lucas
HDS wrote: Thu Oct 21, 2021 12:10 pm I was hoping for a simple way for me to do this for myself. Until someone shares a better idea I will have to filter the tree and look for the stuff that is shown. This is tedious but easier than changing the way everyone works.
Are you using the Hide/Show Display Plane (F8 key)?
Still is manual, but pretty easy to spot what is on/off and turn it with one click

Re: hide planes & sketch in assembly

Posted: Fri Oct 22, 2021 8:15 am
by HDS
Lucas

Yes, that is how I am doing it. It isn't hard but takes a while to go through all the planes and sketches in a small assembly.

Re: hide planes & sketch in assembly

Posted: Fri Oct 22, 2021 8:28 am
by mike miller
A macro would be perfect for this. I would dig through this site first (https://www.codestack.net/) or maybe @gupta9665 has something on hand. I'm pretty sure I saw him or Artem post something like this on the old forum....

Re: hide planes & sketch in assembly

Posted: Fri Oct 22, 2021 12:16 pm
by gupta9665
Here are some for you

http://www.esoxrepublic.com/freeware/BlankDatums2.php

viewtopic.php?p=2292#p2292 (scroll down and check the macro uploaded by @AlexLachance )
image.png
Here is another one from old forums https://forum.solidworks.com/thread/917 ... 5&tstart=0

Re: hide planes & sketch in assembly

Posted: Wed Oct 27, 2021 1:56 pm
by HDS
Gupta9665 thank you for this macro! I had some trouble getting it to work until I downloaded it again. This is what I needed and it will make me more productive.

Re: hide planes & sketch in assembly

Posted: Wed Oct 27, 2021 5:54 pm
by mattpeneguy
HDS wrote: Wed Oct 27, 2021 1:56 pm Gupta9665 thank you for this macro! I had some trouble getting it to work until I downloaded it again. This is what I needed and it will make me more productive.
Yep, @gupta9665 makes a lot of people's lives easier with SW. We're lucky to have him helping us.

Re: hide planes & sketch in assembly

Posted: Thu Oct 28, 2021 7:54 am
by KevinC
Along the lines of Mr. Schroeder's suggestion on using display states.
If you use configurations in conjunction with display states, then the visibility of planes can be controlled.
You must create a configuration in each child file that you need to maintain planes.
Right-click a display state name and select properties. There, check link display states to configuration.
For the new configuration, hide (or show) the planes in question.
Repeat this for each child file.
I suggest using the same configuration name as these must be selected in the assembly.

In the parent assembly, create a configuration (same name as for the children) and right-click display state and set link DS to configs.
In the parent assembly, select each affected child and change its config to the config for the planes display desired.
Once this is done, plane display in the parent assembly is a matter of changing configurations.
image.png
image.png