Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

What is API's POWER?

Status
Not open for further replies.

pyroclasm

Computer
May 17, 2005
24
CA
Hello all you API Gurus.

I am debating to delve into Solidworks API. I am don't consider my self a programer, but I have dealt with different scripting languages such as HTML, Actionscript, 3DSMAX Script, Java Script, etc. I am now taking on a professional career in Industrial Design working primarily with Solidworks. I have many ideas for the program to make it more user friendly and efficient.

I am just want to know how much does Solidworks API allow the user to customize:

1. Can you add custom command buttons to the interface with your own illustrated icons and a cool script to boot?

2. Can you add scripts to any specific right-click pop up menus?

3. Bind Macros to scripts?

4. Rebind your Ctrl, Alt, Enter, Shift, to new keys on the keyboard for convenience?

5. Automate complicated tasks.

6. Create your own dialogue panels.

7. To be able to further manipulate the user interface in a way such as adding things, like tabs on the side of the screen showing what part/assembly/drawing documents are currently open and being able to access them quickly just by clicking them? To have this instead of using the Window Menu. Or create a split view in a Drawing so you can view 2 pages at a time?

8. Be able to toggle on/off certain key parts of the program. Such as scroll bars in the Drawing Graphics View.

9. Create your own Menus with your own scripts, on the main Menu bar?

Like what is the extent to API's power?


Thanks, Robert
 
Replies continue below

Recommended for you

1. Can you add custom command buttons to the interface with your own illustrated icons and a cool script to boot?
Yes<2. Can you add scripts to any specific right-click pop up menus? Yes

3. Bind Macros to scripts?
?

4. Rebind your Ctrl, Alt, Enter, Shift, to new keys on the keyboard for convenience?
no comprende

5. Automate complicated tasks.
Yes
6. Create your own dialogue panels.
yes
7. To be able to further manipulate the user interface in a way such as adding things, like tabs on the side of the screen showing what part/assembly/drawing documents are currently open and being able to access them quickly just by clicking them?Yes
To have this instead of using the Window Menu. Or create a split view in a Drawing so you can view 2 pages at a time? probably

8. Be able to toggle on/off certain key parts of the program. Such as scroll bars in the Drawing Graphics View.
I don't think so
9. Create your own Menus with your own scripts, on the main Menu bar? yes


[bat]I could be the world's greatest underachiever, if I could just learn to apply myself.[bat]
-SolidWorks API VB programming help
 
The best place to start is simply by learning VB6 or VBA. Be sure you have a solid understanding of C, VB (.Net, VB6, or VBA) and object-oriented programming. Otherwise, you are wasting your time.

Once you know VB (or C), get to know how these programs "plug in" to other applications. There are thousands of pages and websites dedicated to VBA in Excel. Might be a good training ground.

[bat]I could be the world's greatest underachiever, if I could just learn to apply myself.[bat]
-SolidWorks API VB programming help
 
Thanks guys. CorBlimeyLimey I already checked it out, I am more or less compiling a list of the cons to getting into API and finding how my company can benefit from it.

TheTick, thanks for responding to each question. Uhh, I corrected these below.

3. Attach Macros to buttons?

4. Attach your Ctrl, Alt, Enter, Shift, to new keys on the keyboard for convenience? Because I am left-handed, its more natural for me to use hotkeys on the number pad. So if I can make the "Num 0" key Ctrl and the "Num 3" key Alt, than that would speed things up for me.

8. Be able to toggle on/off the display of all Command Button Bars on the interface, also hide status bar, using only a single keyr. Thus making a toggle button for Expert Mode, like they have in 3DSMAX showing just the Graphics Area with your model.

Thanks again for all your help guys. :)
 
3. Attach Macros to buttons?
Yes macros can be assigned to buttons in SW using the standard button customization utility (i.e. Tools/Customize/Keyboard). If you want to use one macro to assign certain macros to certain buttons, then you'll need to make an Add-In.

Attach your Ctrl, Alt, Enter, Shift, to new keys on the keyboard for convenience?
Not with SolidWorks.

Alternatives:
[ol]
[li]Since I am right-handed and find the [Enter] key sometimes annoying to click (since it's on the right side of the keyboard). I have a programmable keypad with 20 buttons (one of which is programmed to [Enter], and the others are used for views and calling macros). Mine is a Z-Key from for about $100, but I'm sure there are plenty of others out there.[/li]
[li]My other method for hitting [Enter] was to buy a programmable mouse. It has the standard 3 buttons plus 5 other buttons (all of which are programmable). Of those five, one is [Enter], one is zoom to Isometric View orientation, and the other is [Ctrl]+[Shift]. I use the last one to allow me to basically assign a whole second keyboard's worth of macros (where I have to hold that button in and then hit one key on the keyboard, rather than having to do a multi-key combination all with my left-hand).
[/li]
[/ol]

Be able to toggle on/off the display of all Command Button Bars on the interface, also hide status bar, using only a single key
I have not used this but the SW API call ModelDoc2::Toolbars appears to be able to turn the following Toolbars on/off.[ol]
[li]main toolbar[/li]
[li]view manipulation toolbar[/li]
[li]main sketch toolbar[/li]
[li]sketch entity toolbar[/li]
[li]feature toolbar[/li]
[li]relationships toolbar[/li]
[li]macro toolbar[/li]
[/ol]
And the description for SldWorks::DisplayStatusBar is
This method sets whether to display or not display the status bar.

I'm sure both of the above commands could be initiated by striking a single key.

Ken
 
Wow KenBolen, thanks a lot, you have a lot to good ideas there. The Z-Key looks good. And I never thought to change the exta buttons on my mouse.

Thanks again. :)

Robert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top