hide planes & sketch in assembly

HDS
Posts: 58
Joined: Thu Jul 08, 2021 11:40 am
Answers: 0
x 37
x 28

hide planes & sketch in assembly

Unread post 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.
by gupta9665 » Fri Oct 22, 2021 12:16 pm
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
Go to full post
_________________________________________________________________________
"To succeed, planning alone is insufficient. One must improvise as well."
Salvor Hardin in Isaac Asimov's Novel, "Foundation"
User avatar
Glenn Schroeder
Posts: 1524
Joined: Mon Mar 08, 2021 11:43 am
Answers: 23
Location: southeast Texas
x 1766
x 2135

Re: hide planes & sketch in assembly

Unread post 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.
"On the days when I keep my gratitude higher than my expectations, well, I have really good days."

Ray Wylie Hubbard in his song "Mother Blues"
User avatar
kawuser
Posts: 46
Joined: Fri Mar 12, 2021 9:29 am
Answers: 0
x 34
x 33

Re: hide planes & sketch in assembly

Unread post by kawuser »

Have you tried this?
Attachments
Capture.JPG
User avatar
SPerman
Posts: 2068
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 14
x 2247
x 1889
Contact:

Re: hide planes & sketch in assembly

Unread post 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.
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
User avatar
kawuser
Posts: 46
Joined: Fri Mar 12, 2021 9:29 am
Answers: 0
x 34
x 33

Re: hide planes & sketch in assembly

Unread post by kawuser »

You could write a macro to turn off sketchs, axes, planes etc.
Attachments
Macro1.swp
(23 KiB) Downloaded 169 times
User avatar
Tom G
Posts: 355
Joined: Tue Mar 09, 2021 9:26 am
Answers: 0
Location: Philadelphia, PA area
x 989
x 466

Re: hide planes & sketch in assembly

Unread post 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.
HDS
Posts: 58
Joined: Thu Jul 08, 2021 11:40 am
Answers: 0
x 37
x 28

Re: hide planes & sketch in assembly

Unread post 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.
_________________________________________________________________________
"To succeed, planning alone is insufficient. One must improvise as well."
Salvor Hardin in Isaac Asimov's Novel, "Foundation"
User avatar
Glenn Schroeder
Posts: 1524
Joined: Mon Mar 08, 2021 11:43 am
Answers: 23
Location: southeast Texas
x 1766
x 2135

Re: hide planes & sketch in assembly

Unread post 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
"On the days when I keep my gratitude higher than my expectations, well, I have really good days."

Ray Wylie Hubbard in his song "Mother Blues"
User avatar
Tom G
Posts: 355
Joined: Tue Mar 09, 2021 9:26 am
Answers: 0
Location: Philadelphia, PA area
x 989
x 466

Re: hide planes & sketch in assembly

Unread post 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.
User avatar
Tom G
Posts: 355
Joined: Tue Mar 09, 2021 9:26 am
Answers: 0
Location: Philadelphia, PA area
x 989
x 466

Re: hide planes & sketch in assembly

Unread post 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.
User avatar
JSculley
Posts: 648
Joined: Tue May 04, 2021 7:28 am
Answers: 55
x 9
x 884

Re: hide planes & sketch in assembly

Unread post 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.
User avatar
Ömür Tokman
Posts: 361
Joined: Sat Mar 13, 2021 3:49 am
Answers: 1
Location: İstanbul-Türkiye
x 995
x 347
Contact:

Re: hide planes & sketch in assembly

Unread post 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?
You ˹alone˺ we worship and You ˹alone˺ we ask for help.
User avatar
Tom G
Posts: 355
Joined: Tue Mar 09, 2021 9:26 am
Answers: 0
Location: Philadelphia, PA area
x 989
x 466

Re: hide planes & sketch in assembly

Unread post 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.
User avatar
Glenn Schroeder
Posts: 1524
Joined: Mon Mar 08, 2021 11:43 am
Answers: 23
Location: southeast Texas
x 1766
x 2135

Re: hide planes & sketch in assembly

Unread post 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.
"On the days when I keep my gratitude higher than my expectations, well, I have really good days."

Ray Wylie Hubbard in his song "Mother Blues"
HDS
Posts: 58
Joined: Thu Jul 08, 2021 11:40 am
Answers: 0
x 37
x 28

Re: hide planes & sketch in assembly

Unread post 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".
_________________________________________________________________________
"To succeed, planning alone is insufficient. One must improvise as well."
Salvor Hardin in Isaac Asimov's Novel, "Foundation"
User avatar
Lucas
Posts: 227
Joined: Tue Jun 15, 2021 3:46 am
Answers: 2
Location: Osaka, JP
x 171
x 169

Re: hide planes & sketch in assembly

Unread post 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
HDS
Posts: 58
Joined: Thu Jul 08, 2021 11:40 am
Answers: 0
x 37
x 28

Re: hide planes & sketch in assembly

Unread post 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.
_________________________________________________________________________
"To succeed, planning alone is insufficient. One must improvise as well."
Salvor Hardin in Isaac Asimov's Novel, "Foundation"
User avatar
mike miller
Posts: 878
Joined: Fri Mar 12, 2021 3:38 pm
Answers: 7
Location: Michigan
x 1070
x 1231
Contact:

Re: hide planes & sketch in assembly

Unread post 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....
He that finds his life will lose it, and he who loses his life for [Christ's] sake will find it. Matt. 10:39
User avatar
gupta9665
Posts: 420
Joined: Thu Mar 11, 2021 10:20 am
Answers: 25
Location: India
x 437
x 458

Re: hide planes & sketch in assembly

Unread post 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
Deepak Gupta
SOLIDWORKS Consultant/Blogger
HDS
Posts: 58
Joined: Thu Jul 08, 2021 11:40 am
Answers: 0
x 37
x 28

Re: hide planes & sketch in assembly

Unread post 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.
_________________________________________________________________________
"To succeed, planning alone is insufficient. One must improvise as well."
Salvor Hardin in Isaac Asimov's Novel, "Foundation"
User avatar
mattpeneguy
Posts: 1386
Joined: Tue Mar 09, 2021 11:14 am
Answers: 4
x 2489
x 1899

Re: hide planes & sketch in assembly

Unread post 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.
KevinC
Posts: 92
Joined: Fri Mar 12, 2021 10:14 am
Answers: 1
x 17
x 70

Re: hide planes & sketch in assembly

Unread post 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
Post Reply