Page 1 of 1

Instantiation of TopSolid.Application(Start of TopSolid) throws COM-Exception 80080005

Posted: Thu Jul 07, 2016 9:53 am
by GSus42
Hello,

I am trying to implement a Test-Interface between TopSolid and our PDM-Solution.
I use TopSolid 7.10 and VisualStudio 2012 with VB.NET. (I chose .NET-Framework 3.5 since I read somewhere that this is the recommended Version for accessing the TopSolid-API. But don't know where anymore.)

I followed the API-Description, added the Reference to the TopSolid 6.16 Type Library in my VisualStudio 2012 Project.
The API seems to work. VISTUDIO knows the TopSolid.xxx-Classes.

I started with implementing (nearly just copying ;P) the code from the "Examples\How to start"-Section of the API-Documentation.
First time, it just works. It was so easy. My program started TopSolid, opened a new Document, painted the circle, put the surface on it and gave you the Save-As-Dialogue. I was very happy. :)
I try it the next day and all I get since then is the COM-Exception 80080005 for the line
TopApp = New TopSolid.Application

Error reads something like(have to translate, have it in German):
System.Runtime.InteropServices.COMException (0x80080005): The COM-Classfactory for the component with CLSID ... couldn't be called because of the following error: 80080005.
at ... line 91
(the line is "TopApp = New TopSolid.Application" as I wrote above)

Most posts and solutions about this error in general seem to be connected to the DCOM-Permissions. But when I use "DCOMCNFG identity" the TopSolid-COM-Object already stands on the recommended "interactive User".

I tried restarting TopSolid manually and do it again, but all that does is sometimes delete my reference to the TopSolid-API so the TopSolid.XXX-Classes are unknown to VISTUDIO again.

Any advice?
Any info I can further give?

Re: Instantiation of TopSolid.Application(Start of TopSolid) throws COM-Exception 80080005

Posted: Thu Jul 07, 2016 2:25 pm
by gmanucci
Hi!

Sorry, but i don't understand wich version are you using, 7.10 or 6.16?

By the code, i guess you're using TS V6, right?

If its TS V7, you have to reference TopSolid.Kernel.Automating.dll :B

Re: Instantiation of TopSolid.Application(Start of TopSolid) throws COM-Exception 80080005

Posted: Thu Jul 07, 2016 2:58 pm
by GSus42
Hi,

you are right, that seems odd. I supposed I have 7.10 installed.
Didn't install it. Admin-Staff did that.
On my Desktop shows a shortcut to TopSolid 7.10.
But in VisualStudio 2012 (do I maybe need VisualSpydio2015?) it only shows "TopSolid 6.16 Type Library" and "TopSolid'Viewer OLE Control module" (1.0).
Can't find your mentioned "TopSolid.Kernel.Automating.dll" anywhere.


Thanks for trying to help.


Update: Found the DLL you mentioned. Will test it with that.

Re: Instantiation of TopSolid.Application(Start of TopSolid) throws COM-Exception 80080005

Posted: Thu Jul 07, 2016 3:21 pm
by GSus42
The TopSolid.Kernel.Automating.dll is in my 7.10-Bin-Folder
But if I use it instead of the TypeLibrary of 6.16 VISTUDIO doesn't know the classes TopSolid.Application, TopSolid.DocumentDesign or any other TopSolid-Class of the API any more.


And another thing: if the 6.16 Type Library isn't the correct one. How can it be, that the first time the VB.NET-program worked, started TopSolid, opened the new document, drew the circle, filled it and gave me the save-Dialogue, if that is the wrong library?
Either something got changed, (Since I didn't change anything over the weekend, either it is something our Domain-Administrators changed, or something else I don't have an idea about) or:
starting TopSolid with the API is non-deterministic
and by that I mean, "It doesnt work, except for the first time"?!

How the fudge can that be.

And another thing: how can it be, that VISTUDIO knows about the 6.16 Type Lib from scratch, but the supposedly actual 7.10-DLL has to be manually searched and added?

Sorry about getting angry. But as you can imagine, this can be very frustrating.

Re: Instantiation of TopSolid.Application(Start of TopSolid) throws COM-Exception 80080005

Posted: Thu Jul 07, 2016 3:57 pm
by GSus42
Ok, it seems the 6.16 Type Library was the remnant of an old installation on our CAD-Machine.

Also, it seems the whole Syntax changed from 6.16 to 7.10.
And it seems API-Documentation for 7.x is only available if we buy a maintenance contract?!
I don't find anything similar to the TopSolidAPI.chm we had for 6.x in the Help\en- or Help\de-folders
And D@avid's Post to get the Help-Document for the 6.x-Version (viewtopic.php?f=5&t=86) has no corresponding post for 7.x

So it seems I can only advice our management next week to either get a maintenance contract with TopSolid and buy a cat in a box(pig in a poke?!) or just ignore it and let all German Automotive companies just use the products of your competitors?

Seems harsh, we had good experience with the usability of 6.x and I briefly had good experiences with the 6.x API.

Re: Instantiation of TopSolid.Application(Start of TopSolid) throws COM-Exception 80080005

Posted: Thu Jul 07, 2016 4:17 pm
by gmanucci
Hey!

sry for replying late, so u are using TS V7, right?

in TS7 we have the help on the folloing path:
Image

it helped me so much.

Re: Instantiation of TopSolid.Application(Start of TopSolid) throws COM-Exception 80080005

Posted: Thu Jul 07, 2016 4:30 pm
by GSus42
Thank you so much.

Now I feel pretty stupid.
Maybe Missler can turn around the horrible picture I got the last few days after all.

Re: Instantiation of TopSolid.Application(Start of TopSolid) throws COM-Exception 80080005

Posted: Thu Jul 07, 2016 4:38 pm
by gmanucci
lol, don't feel like that, we are here to help each other