From: Chris Dubea on
Hi there,

I'm working on an application in VB which will be an DLL add-in for
SolidWorks. I've got my project set up with my class file holding all
the menu creation stuff needed.

It all works fine. And then I decided to get creative. I'm
developing an application that will be customized with an XML file and
may or may not include interfaces for all three SolidWorks documents.
So I decided to read the XML file in my class file, and then set up
the menu's and tool bars per the settings in the XML file.

The DLL builds just fine, but when I try to load it in SolidWorks it
tells me it cannot be loaded, Either the Add-in or one of it's
components is missing.

So the question of the day (hour?) Is there a limitation to what you
can do in the class file which sets up the menus and toolbars and then
calls the form?

Thanks
===========================================================================
Chris
From: Heikki Leivo on
> So the question of the day (hour?) Is there a limitation to what you
> can do in the class file which sets up the menus and toolbars and then
> calls the form?

The problem is that an unhandled error occurs either in the Class_Initialize
or in SwAddin::ConnectToSW method. To find out what goes wrong you have to
debug your application. Put a breakpoint in the mentioned methods, hit
Run -> Start and start solidworks, then step through the code to find out
what goes wrong.

You should perform error handling in every sub or function to prevent any
unhandled errors.

-h-


From: That70sTick on
Not much of a reply, but...

<http://www.esoxrepublic.com/devtools>
An example of how it is done.

From: Chris Dubea on
On Wed, 22 Feb 2006 18:01:21 +0200, "Heikki Leivo"
<heikkidotleivo(a)cadworksdotfi.removethis> wrote:

>> So the question of the day (hour?) Is there a limitation to what you
>> can do in the class file which sets up the menus and toolbars and then
>> calls the form?
>
>The problem is that an unhandled error occurs either in the Class_Initialize
>or in SwAddin::ConnectToSW method. To find out what goes wrong you have to
>debug your application. Put a breakpoint in the mentioned methods, hit
>Run -> Start and start solidworks, then step through the code to find out
>what goes wrong.
>
>You should perform error handling in every sub or function to prevent any
>unhandled errors.
>
>-h-
>

Okay that makes sense. Thanks.

Let's review the debugging issue a bit if we can. I've done this in
the past but can't for the life of me get this to work.

Can you be MUCH more specific about how to make this work?
===========================================================================
Chris
From: Chris Dubea on
On Wed, 22 Feb 2006 11:00:51 -0600, Chris Dubea
<cdubea(a)movingpart.com> wrote:

>
>Okay that makes sense. Thanks.
>
>Let's review the debugging issue a bit if we can. I've done this in
>the past but can't for the life of me get this to work.
>
>Can you be MUCH more specific about how to make this work?
>===========================================================================
>Chris

Never mind. I got it sorted out.

Thanks
===========================================================================
Chris