hide planes & sketch in assembly
hide planes & sketch in assembly
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.
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 )
Here is another one from old forums https://forum.solidworks.com/thread/917 ... 5&tstart=0
Go to full posthttp://www.esoxrepublic.com/freeware/BlankDatums2.php
viewtopic.php?p=2292#p2292 (scroll down and check the macro uploaded by @AlexLachance )
Here is another one from old forums https://forum.solidworks.com/thread/917 ... 5&tstart=0
_________________________________________________________________________
"To succeed, planning alone is insufficient. One must improvise as well."
Salvor Hardin in Isaac Asimov's Novel, "Foundation"
"To succeed, planning alone is insufficient. One must improvise as well."
Salvor Hardin in Isaac Asimov's Novel, "Foundation"
- Glenn Schroeder
- Posts: 1527
- Joined: Mon Mar 08, 2021 11:43 am
- Location: southeast Texas
- x 1777
- x 2142
Re: hide planes & sketch in assembly
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"
Ray Wylie Hubbard in his song "Mother Blues"
Re: hide planes & sketch in assembly
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
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
Re: hide planes & sketch in assembly
You could write a macro to turn off sketchs, axes, planes etc.
- Attachments
-
- Macro1.swp
- (23 KiB) Downloaded 229 times
Re: hide planes & sketch in assembly
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.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.
Just an idea. I'm open to learning unexpected consequences.
Re: hide planes & sketch in assembly
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.
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"
"To succeed, planning alone is insufficient. One must improvise as well."
Salvor Hardin in Isaac Asimov's Novel, "Foundation"
- Glenn Schroeder
- Posts: 1527
- Joined: Mon Mar 08, 2021 11:43 am
- Location: southeast Texas
- x 1777
- x 2142
Re: hide planes & sketch in assembly
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.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.
"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"
Ray Wylie Hubbard in his song "Mother Blues"
Re: hide planes & sketch in assembly
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. Good luck.
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. Good luck.
Re: hide planes & sketch in assembly
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.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.
Re: hide planes & sketch in assembly
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.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
- Ömür Tokman
- Posts: 361
- Joined: Sat Mar 13, 2021 3:49 am
- Location: İstanbul-Türkiye
- x 995
- x 347
- Contact:
Re: hide planes & sketch in assembly
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.
Re: hide planes & sketch in 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.
- Glenn Schroeder
- Posts: 1527
- Joined: Mon Mar 08, 2021 11:43 am
- Location: southeast Texas
- x 1777
- x 2142
Re: hide planes & sketch in assembly
There was one, once upon a time.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.
"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"
Ray Wylie Hubbard in his song "Mother Blues"
Re: hide planes & sketch in assembly
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".
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"
"To succeed, planning alone is insufficient. One must improvise as well."
Salvor Hardin in Isaac Asimov's Novel, "Foundation"
Re: hide planes & sketch in assembly
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
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.
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"
"To succeed, planning alone is insufficient. One must improvise as well."
Salvor Hardin in Isaac Asimov's Novel, "Foundation"
- mike miller
- Posts: 878
- Joined: Fri Mar 12, 2021 3:38 pm
- Location: Michigan
- x 1070
- x 1231
- Contact:
Re: hide planes & sketch in assembly
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
Re: hide planes & sketch in assembly
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 )
Here is another one from old forums https://forum.solidworks.com/thread/917 ... 5&tstart=0
http://www.esoxrepublic.com/freeware/BlankDatums2.php
viewtopic.php?p=2292#p2292 (scroll down and check the macro uploaded by @AlexLachance )
Here is another one from old forums https://forum.solidworks.com/thread/917 ... 5&tstart=0
Deepak Gupta
SOLIDWORKS Consultant/Blogger
SOLIDWORKS Consultant/Blogger
Re: hide planes & sketch in assembly
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"
"To succeed, planning alone is insufficient. One must improvise as well."
Salvor Hardin in Isaac Asimov's Novel, "Foundation"
- mattpeneguy
- Posts: 1386
- Joined: Tue Mar 09, 2021 11:14 am
- x 2489
- x 1899
Re: hide planes & sketch in assembly
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.
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.