Using InventorViewCtrl.ocx in VC++-addins error!

Using InventorViewCtrl.ocx in VC++-addins error!

Anonymous
Not applicable
299 Views
3 Replies
Message 1 of 4

Using InventorViewCtrl.ocx in VC++-addins error!

Anonymous
Not applicable
Hi,everyone:
I'm using InventorViewCtrl.ocx in addin to browse parts within Inventor application. But error occurs whenever before the dialoge containing the ocx shows. I've add AfxEnableControlContainer() to the code. And everything is OK when I make it as run-alone EXE. I don't know why.
I use VC++ and Inventor9.
Please help!
0 Likes
300 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
You can't use this control within an Add-In. The reason for this is that
control is based on Apprentice so using the control in an Add-In causes
Apprentice to be loaded within Inventor's process space. This is not valid
and will cause problems. There isn't a good solution that I'm aware of.
One is to create your Add-In as an ActiveX EXE instead of a DLL, then it
won't run within Inventor's process space and using Apprentice is valid.
--
Brian Ekins
Autodesk Inventor API

wrote in message news:5582752@discussion.autodesk.com...
Hi,everyone:
I'm using InventorViewCtrl.ocx in addin to browse parts within Inventor
application. But error occurs whenever before the dialoge containing the ocx
shows. I've add AfxEnableControlContainer() to the code. And everything is
OK when I make it as run-alone EXE. I don't know why.
I use VC++ and Inventor9.
Please help!
0 Likes
Message 3 of 4

Anonymous
Not applicable
Hi, Brian Ekins:
Thank you for your help.
Do you mean that I have to use the InventorViewCtrl.ocx in a run-alone EXE but not a Dll Addin? But that way my developed function can't be seamlessly integrated into Inventor. Is there any API having function like that ocx ?
0 Likes
Message 4 of 4

Anonymous
Not applicable
That's correct, you cannot use the InventorViewCtrl.ocx within a dll Add-In.
Unfortunately there is not any API capability in Inventor that provides
equivalent functionality.
--
Brian Ekins
Autodesk Inventor API

wrote in message news:5584097@discussion.autodesk.com...
Hi, Brian Ekins:
Thank you for your help.
Do you mean that I have to use the InventorViewCtrl.ocx in a run-alone
EXE but not a Dll Addin? But that way my developed function can't be
seamlessly integrated into Inventor. Is there any API having function like
that ocx ?
0 Likes