×
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

Solidworks Add-in...

Solidworks Add-in...

Solidworks Add-in...

(OP)
HI!!


I want to do a solidorks add-in showing a toolbar in VB, with the new interfase SWaddin and the command addtoolbar3.
But I've some problems with the function addtoolbar3 and addtoolbarcommand.I don't know how to get handles of bitmaps(addtoolbar3),and how to put the name of my callbackfunction(addToolbarCommand).
Is Someone who can send a bit of code in order to help a poor guy working during hollidays to pay his studies....

RE: Solidworks Add-in...

I don't know how to to create your own toolbar, but...the native Macros toolbar already has buttons on it, to which you can assign a pointer to run whatever macro you may have stored.  I don't know if you can assign more than 10 tho?

RE: Solidworks Add-in...

Hi,

If you tell me your email address I can send you an example.

Regards,

MHendler

RE: Solidworks Add-in...

MHendler,
        This sounds hopeful. I did not know, that Visual Basic could add a button to the tool bar.  I know about the macro tool bar. Can you create other buttons on the SolidWorks tool bar?
brad_johnson@dstoutput.com

Bradley

RE: Solidworks Add-in...

MHendler,
I would like to take a look at your example file too...I'm tring to create one here myself, but not having any luck.  You can send it to:  bolen.16@osu.edu
Thanks,
Ken  Bolen

RE: Solidworks Add-in...

Hi,
I'd appreciate a copy as well:
eearnst@accuray.com

Thanks,
Eric

RE: Solidworks Add-in...

MHendler,
I would also like to take a look at your sample.
Thank you.

DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.

RE: Solidworks Add-in...

Hi,

Could anybody send also me the code?

I have problem on my add-in


hToolBar = pSldWorks.AddToolbar3(swCookie, "My ToolBar", 102, 101, 5, swDocTemplateTypeASSEMBLY)

pSldWorks.AddToolbarCommand2 swCookie, hToolBar, 0, "Toolbar_Callback", 0, "titolo ToolBar", "pick me"


thank

Massimiliano

RE: Solidworks Add-in...

I would like to see your example as well

                        Thanks

                           Tom
cheng1222@yahoo.com

RE: Solidworks Add-in...

I would like to take a look at your example file too...I'm not having any luck at all.  You can send it to:  wim.vancoillie@stas.be

Thanx,
Wim Vancoillie

RE: Solidworks Add-in...

I did not have much API-generated success myself, but as of SW2k1+, the VBA has a modeless form. You can 'cheese' out a toolbar (if you dont mind it having a title bar) by just dropping image controls on a Userform, and sizing the form around it. And when you  show the form as modeless, you can constantly interact with SW, and the 'toolbar' is already floating on top.

RE: Solidworks Add-in...

I don't know if any of you are aware of this or not (and if you are I apologize for the redundant infot) but in the API support section of the SolidWorks website I found a code example (in VB) for doing exactly what's being discussed here.  While I have downloaded it I admit to only giving the code a quick once over and have not completely digested the specifics of how it works.  It's probably worth a look though at least to some.

Chris Gervais
Mechanical Designer
American Superconductor

RE: Solidworks Add-in...

MHendler,

there's so much interest around your piece of code that you should post it into FAQs. I would like to take a look at your code, too.

Andrew

Rawhead Rex,

can you be alittle more specific, pls.

A.

RE: Solidworks Add-in...

Everyone,

Here is the link to the SolidWorks API Support website Code Example section.  I looked again and specifically, the code example (in VB) is a Visual Basic COM DLL addin project.  Again I don't know whether or not this helps anyone out but on the outside chance that it might stimulate some ideas I figured it worth mentioning.  It's certainly something that I plan on giving serious consideration to make use of.

http://www.solidworks.com/api/index.cfm?template=CodeExamples

Chris Gervais
Mechanical Designer
American Superconductor

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