Inventor Can't Connect with Visual Basic

Inventor Can't Connect with Visual Basic

abilabib
Advocate Advocate
771 Views
12 Replies
Message 1 of 13

Inventor Can't Connect with Visual Basic

abilabib
Advocate
Advocate

How to solve this problem. Because Inventor Can't Connect with Visual Basic. 

I'm use Inventor 2015 and Visual Studio Express 2015. 

 

Regards,

 

Afri

0 Likes
772 Views
12 Replies
Replies (12)
Message 2 of 13

abilabib
Advocate
Advocate

Cant Connect.JPG

0 Likes
Message 3 of 13

chandra.shekar.g
Autodesk Support
Autodesk Support

@abilabib,

 

Before running this code, make sure that Inventor 2015 is launched to connect through Visual basic.

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 4 of 13

abilabib
Advocate
Advocate

@chandra.shekar.g : I've make sure that Inventor 2015 is launched first and then running the code. But this code can't connect with Inventor. Could tell me how to trace this problem ?

0 Likes
Message 5 of 13

chandra.shekar.g
Autodesk Support
Autodesk Support

@abilabib,

 

Actually, Inventor 2015 build is unavailable to test for us. Inventor 2015 contains 2 types of dll(Autodesk.Inventor.Interop.dll). One is 32 bit dll for 32 bit application and another one is 64 bit dll. Issue might be due to referencing 32 bit dll in 64 bit application.

 

Can you please edit MessageBox.Show inside Catch ? So that, it gives idea about what kind of exception that you are getting.

 

Catch ex as Exception
       MessageBox.Show("Inventor Haras Dalam keadaan Aktif " &  ex.Message)
       Me.Close()
       Exit Sub
End Try 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 6 of 13

abilabib
Advocate
Advocate

@chandra.shekar.g : Thanks for your reply. I'll try after IED holiday. Because it only happens in the office

0 Likes
Message 7 of 13

abilabib
Advocate
Advocate

@chandra.shekar.g : 

Here's the message :

 

(Exception from HRESULT: 0x800401F3 (CO_E_CLASSSTRING))

0 Likes
Message 8 of 13

chandra.shekar.g
Autodesk Support
Autodesk Support

@abilabib,

 

If Inventor 32 dll is used, make sure that configuration manager is set to x86 in Visual studio. Similarly, for 64 bit dll, configuration manager should be x64.

 

Can you please share source code to investigate? please make sure that files are non confidential.

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 9 of 13

abilabib
Advocate
Advocate

@chandra.shekar.g

File attached. 

0 Likes
Message 10 of 13

chandra.shekar.g
Autodesk Support
Autodesk Support

@abilabib,

 

Sorry for late reply,

 

Attached source code is tested in my system (Except that unavailability of Inventor 2015)

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 11 of 13

abilabib
Advocate
Advocate

@chandra.shekar.g : Thanks for your reply. But I can't find attached. 

0 Likes
Message 12 of 13

chandra.shekar.g
Autodesk Support
Autodesk Support

@abilabib,

 

I meant that source code which is attached in previous conversation.

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 13 of 13

abilabib
Advocate
Advocate

@chandra.shekar.g: Oh Ok. I see.

0 Likes