Community
Navisworks API
Welcome to Autodesk’s Navisworks API Forums. Share your knowledge, ask questions, and explore popular Navisworks API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cannot load suitable Navisworks runtime

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
JohnHon
1406 Views, 4 Replies

Cannot load suitable Navisworks runtime

Dear all,

 

I am creating a window form application with document control and view control.

When I run following code, an exception occurs.

Autodesk.Navisworks.Api.Controls.ApplicationControl.Initialize()

 

RuntimeLoaderException

Cannot load suitable Navisworks runtime. Note that 32bit Navisworks Controls are not supported on 64bit OS except in DesignMode

 

For your information, I am using Visual Studio 10 and Navisworks Manage 2013.

Also, Autodesk.Navisworks.Controls.dll is added to the reference.

For Controls.dll,

Runtime Version:v4.0.30319

version:10.0.840.82

My PC is windows 7 Professional and both PC and Navisworks are 64- bit.

 

Could you help me to solve it?

 

Thanks,

John

4 REPLIES 4
Message 2 of 5
xiaodong_liang
in reply to: JohnHon

Hi John,

please check the project setting if you configured to X86. By default, VS creates the standalone EXE with X86 (this default setting can be configured, I believe). In runtime, a X86 EXE will try to load the X86 modules, but
.NET modules of Navisworks .NET API is 64bits on 64bits machine. So either change to X64, or Any CPU.
Message 3 of 5
JohnHon
in reply to: xiaodong_liang

Dear Xiaodong,

 

Thanks for your answer. I change it to Any CPU and it works!

 

Thanks,

John

Message 4 of 5
ericjoe
in reply to: xiaodong_liang

Hi, I have changed the Configuration Manager to "x86" and "Any CPU".

 

However, I still face the same error message.

 

Autodesk.Navisworks.Api.RuntimeLoaderException was unhandled
  HResult=-2146233079
  Message=Cannot load suitable Navisworks runtime
  Source=Autodesk.Navisworks.Api
  StackTrace:
       at Autodesk.Navisworks.Internal.ApiImplementation.ApplicationImpl.InitialiseErrorHandling(ApplicationConfig config)
       at Autodesk.Navisworks.Internal.ApiImplementation.ApplicationImpl.InitialiseResources(ApplicationConfig config)
       at Autodesk.Navisworks.Internal.ApiImplementation.ApplicationImpl.InitialiseApi(ApplicationConfig config)
       at Autodesk.Navisworks.Api.Controls.ApplicationControl.InitializeImpl()
       at Autodesk.Navisworks.Api.Controls.ApplicationControl.Initialize()
       at Viewer.Program.Main() in C:\Working_Place_Joe\AMNIS\Technical Issue\Navisworks\Navisworks_2016_API_Training_Labs\Individual labs\Nw_Single_Doc_With_View\Program.cs:line 44
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
       at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
       at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
       at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
       at System.Activator.CreateInstance(ActivationContext activationContext)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: 

Can you advise me what should I do?


Thank you.

Message 5 of 5
Ganesh7
in reply to: ericjoe

Hi,

If your Navisworks is 64Bit, change the setting of VS to x64 and try to compile,

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report