Navisworks 2024 SDK is posted

By Naveen Kumar

Navisworks 2024 SDK has been posted on ADNOpen: 

https://www.autodesk.com/developer-network/platform-technologies/navisworks

Navisworks 2024 is built against .NET Framework 4.8, which means the application with NET API supports .NET Framework 4.8 and above. The program will need to be compiled by Visual Studio 2022 and .NET Framework 4.8 and above.

In Navisworks 2024 API, We have found an issue of .NET control application.

Issue Description: Autodesk.Navisworks.Api.Controls.ApplicationControl.Initialize() will throw an exception: “External Component has thrown an exception”.

GIF

Solution: This issue is scheduled to be fixed in future update.

For now, the workaround is to add the installation directory of Navisworks to the path before calling Autodesk.Navisworks.Api.Controls.ApplicationControl.Initialize(); 

(i.e) Environment.SetEnvironmentVariable(“PATH”,Environment.GetEnvironmentVariable(“PATH”)+ “;”+nwInstallDir); 

where nwInstallDir has a value corresponding to where NW is installed.

Your sample code will look like this


static void XMain()
{
//Set Environment variable
string nwInstallDir = @"C:Program FilesAutodeskNavisworks Manage 2024";
Environment.SetEnvironmentVariable("PATH",
Environment.GetEnvironmentVariable("PATH")+";"+nwInstallDir);
//Set to single document mode
Autodesk.Navisworks.Api.Controls.ApplicationControl.ApplicationType=ApplicationType.SingleDocument;
//Initialise the api
Autodesk.Navisworks.Api.Controls.ApplicationControl.Initialize();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Viewer());
//Finish use of the API.
Autodesk.Navisworks.Api.Controls.ApplicationControl.Terminate();
}

Comments

2 responses to “Navisworks 2024 SDK is posted”

  1. This is an amazing and informative article that covers so much ground.

  2. Polina Hoyt Avatar
    Polina Hoyt

    Struggling to fit curves to complex datasets? SplineCloud’s curve fitting tool provides precise spline-based interpolation and advanced regression models, ensuring accurate trend analysis. Whether you’re working in engineering, science, or finance, this tool helps refine your data. Try it now at https://splinecloud.com/features/curve-fitting/ and achieve better results.

Leave a Reply to free gamesCancel reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading