×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

SW Menus

SW Menus

SW Menus

(OP)
Hi,
How can I hide the menus and toolbars of SolidWorks? Note: The user can not add this removed buttons.

Regards,

MHendler

RE: SW Menus

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?

RE: SW Menus

(OP)
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

RE: SW Menus

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........  

RE: SW Menus

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

RE: SW Menus

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

RE: SW Menus

How do you make a macro run on startup?

RE: SW Menus

Use notifications so that the save event triggers your macro.

For an example, see "FileSaveNotify" in the API help.

Gravity is a harsh mistress.

RE: SW Menus

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.

RE: SW Menus

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


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources