I would like to create a macro that allows me to hide or redisplay an assembly of all the parts of the library toolbox. Is there a way to select only the parts of the toolbox?
Thank you all for an answer.
Dim swApp As SldWorks.SldWorksDim boolstatus As BooleanDim swModel As SldWorks.ModelDoc2Dim swAssy As SldWorks.AssemblyDocDim swASC As SldWorks.AdvancedSelectionCriteria
Set swApp = Application.SldWorksSet swModel = swApp.ActiveDocSet swAssy = swModelSet swASC = swAssy.GetAdvancedSelectionboolstatus = swASC.LoadCriteria("C:\SelectToolbox.sqy") Paste attached file onto computer and specify locationswASC.SelectswModel.HideComponent2 Self explanitoryswModel.ShowComponent2End Sub
Welcome to SOLIDWORKS forums Fabrizio.
You can use the power select option to select the toolbox part and then hide/show them.
CLICK HERE for more info on Power Select.
You might also find this post helpful for your future reference.
Hello mythical Gupta!
When I work with my assembly, to check that the holes are positioned correctly I need to hide all of the toolbox.
This happens very often, which is why I want to create a button which when pressed will instantly hide all of the toolbox.
I often use the power selection, but it forces me to too many clicks!
With a button on / off would be very faster!
I often use parts of your macro to create my own!
Thank you for your contributions!
Recording a macro vba, I saw that the correct command should be:
But I can not find the correct syntax ....
Thanks if you can help me!
The macro might be time consuming because it will take a will to select all those parts. use the option "Select Toolbox" in power select, then right click and select hide/show components.
You can set a keyboard shortcut for "Select toolbox" command. Then press that button and right click to select hide/show.
Are you using SolidWorks 2014?
Thank's Deepak, this is the method that currently use...
I hope to find some ideas as a starting point ...
Hi Artem, im' currently using SW2014.
Thanks anyway, good job.
Cool, thanks for sharing that Mark
Hello Mark, Thanks!
You've got a great idea!
Good SolidWorks tor you and all SolidWorks users!
I have a question about a query for select components in assembly from custom properties, that don't work:
I use SolidWorks 2015 Italiano
My string in the .sqy file is:
"Proprietà personalizzate" "MATERIALE" "=" "K110"
But don't works, were I wrong?
Thanks a lot to everybody
Retrieving data ...