作成しようとしているVB.NETアプリケーションの問題の解決策を見つけるために、サイトとインターネットを調べました。残念ながら、Inventorのカスタマイズを進めることができなかったエラーメッセージに困惑しています。
Tools: Visual Studio 2005 sp1, Inventor 11 Stand Alone install
OS: Windows Vista 64 sp1
SDKフォルダーの下に開発ツールをインストールしました。次に、COMのVB.NETプロジェクトで、AutoDesk InventorObjectLibraryという名前のコンポーネントへの参照を追加しました。私のプロジェクトのリファレンスの下に次のように表示されます。
Reference Name: Autodesk Inventor Object Library
Type: COM
Version: 1.0.0.0
Copy Local: True
Path: C:\Users\rschmalt\Visual Studio 2005\Projects\
InvTest\InvTest\obj\Debug\Interop.Inventor.dll
私のコードは次のとおりです。
'Opens Inventor Apprentice session to read part numbers
Dim oApprentice As New Inventor.ApprenticeServerComponent
Dim asmDoc As Inventor.ApprenticeServerDocument
Dim refDoc As Inventor.ApprenticeServerDocument
asmDoc = oApprentice.Open(strIAMLocation)
For Each refDoc In asmDoc.ReferencedDocuments
MessageBox.Show(refDoc.FullFileName.ToString)
Next
実行すると、次のメッセージが表示されます。
Retrieving the COM class factory for component with CLSID {C343ED84-A129-11D3-B799-0060B0F159EF} failed due to the following error: 80040154
DLL()を直接参照しようとするとInterop.Inventor.dll
、参照に.NETタイプとして表示されますが、エラーは同じままです。
ビスタ64(発明者11は32ビット)の間に競合がある可能性はありますか?助言がありますか?