Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

SW Menus

Status
Not open for further replies.

MHendler

Mechanical
Mar 28, 2002
35
Hi,
How can I hide the menus and toolbars of SolidWorks? Note: The user can not add this removed buttons.

Regards,

MHendler
 
Replies continue below

Recommended for you

Under TOOLS - CUSTOMIZE )or right click anywhere in the toolbar area and click customize) you can turn all of the toolbars on or off.

Also on the commands tab of the menu, you can add additional icons to your toolbars which are not there by default.

The menu's tab will also allow you to customize your menu's but why would you want to do this?
 
I'm trying to don't permit the users to use the save button and the save menu because I´m gonna make another way to save (API).

Regards,

MHendler
 
Additional thought....

The toolbars are default set to auto-activate, that is follow the document set-up.

On the TOOLS - CUSTOMISE - TOOLBARS TAB try unchecking the auto-activate toolbars box. Maybe that's what you are after........
 
Mhendler, there is no way to disable the users from customizing their toolbars short of changing their user permissions on their workstations. Basically you would have to disable their right to write to the system registry. and also thier ability to write to their .cus file under C:/...solidworks/user[\b] directory. THe problem here is that no matter what you do, you can not prevent the user from modifying the toolbars during each session. They will not be able to keep their changes though. Also you will also be degrading the performance of other solidworks functions that require high-level or poweruser permissions. I would not recommend that attempt to do something like this. Rather if you have an apllication that you wish them use via the API, develop it, implement it, and educate all involved on its usage and explain why they should use the new code.

Regards,
Jon
jgbena@yahoo.com
 
Also you can put your program to Startup. This program would
work in background and monitor SW and catch SW notifications like "OnSave".
Then maybe you can do your thing.

BR,
Linqur
 
Use notifications so that the save event triggers your macro.

For an example, see "FileSaveNotify" in the API help. [bat]Gravity is a harsh mistress.[bat]
 
Question: How can I start up a macro upon loading SolidWorks?

Answer: The "sldworks.exe /M 'macroName'" command line string can be used to execute a macro on startup.
 
here is something to get you started.

To do this right, you'd probably want to specify which toolbars, etc, and probably use a Form, etc... which cant be posted here.

The following snippet will turn ALL toolbars on/off. There's no error checking, or version checking... which will especially be needed if NOT run on sw2003, because the numbers of toolbars can/will change.


Sub main()

Dim Toolbar As Long
Dim swApp As SldWorks.SldWorks
Dim Part As ModelDoc2
Dim Visibilty As Boolean: Visibility = False 'set to false to hide

Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc

' assuming SW2003, and 27 toolbars ...
For Toolbar = 0 To 26
Part.SetToolBarVisibility Toolbar, Visibility
Next Toolbar

End Sub


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor