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: 

Autodesk.Navisworks.Api.pdb not loaded

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
austin.rausch9NCU2
2726 Views, 9 Replies

Autodesk.Navisworks.Api.pdb not loaded

I am creating a Navisworks plugin that utilizes Triangle.Net to create a mesh from the locations of MTEXT items. When I run the plugin in Navisworks I get this error.

 

assets error.PNG

 

The project builds fine and I get this error while debugging. The exception at the bottom says it can't load Triangle, but I'm not sure why.

 

I'll insert my code as well. 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;

using Autodesk.Navisworks.Api.Plugins;
using Autodesk.Navisworks.Api;

using Autodesk.Navisworks.Api.ComApi;
using Autodesk.Navisworks.Api.Interop.ComApi;

using TriangleNet;
using TriangleNet.IO;
using TriangleNet.Geometry;

namespace Assets
{
    [PluginAttribute("Assets", "AKR",
       DisplayName = "Assets",
       ToolTip = "Attributes space to each room tag and locates all of the assets within that room.")]
    public class SaveViewpoints : AddInPlugin
    {
        public override int Execute(params string[] parameters)
        {
            InputGeometry roomCenters = new InputGeometry();
            InputGeometry sects = new InputGeometry();
            InputGeometry assets = new InputGeometry();
            Mesh mesh = new Mesh();
            Search search = new Search();
            ModelItemCollection matches = new ModelItemCollection();
            Document oDoc = Autodesk.Navisworks.Api.Application.ActiveDocument;

            // create search group / add conditions to the group / execute the search

            SearchCondition con1 = SearchCondition.HasPropertyByDisplayName("Item", "Type").EqualValue(VariantData.FromDisplayString("MTEXT"));
            search.SearchConditions.Add(con1);

            //make selection and execute search
            search.Selection.CopyFrom(oDoc.CurrentSelection.SelectedItems.DescendantsAndSelf);
            matches = search.FindAll(Autodesk.Navisworks.Api.Application.ActiveDocument, false);

            // Add the points. 
            foreach(ModelItem room in matches)
            {
                roomCenters.AddPoint(room.Geometry.BoundingBox.Center.X, room.Geometry.BoundingBox.Center.Y);
            }

            mesh.Triangulate(roomCenters);

            FileWriter.Write(mesh, "test.ele");
            
            /*for (int i = 0; i < matches.Count; i++)
            {

            }*/


            return 0;
        }
    }
}

Any help would be greatly appreciated! 

9 REPLIES 9
Message 2 of 10

I found the issue. I did not build Triangle.dll in the Navisworks 2016 directory. I figured this out by using Sysinternals Process Monitor to find the failed processes.

Message 3 of 10

what do you mean by "build Triangle.dll in the Navisworks 2016 directory"?

Message 4 of 10

I'm having the same problem trying to use XBim library but I don't understand how you fix your problem, can someone explain? I tried to copy the library files to the Navisworks Dependencies folder but doesn't work.

Message 5 of 10

This is a bad solution that only works for your project. The fact is that the PDB files are not provided on Autodesk's Symbol servers and prevent proper debugging. The only reason you managed to fix the issue is because you prevented Navisworks from crashing.

Message 6 of 10
jkh002
in reply to: garylzimmer

 I am facing the same problem . The programs builds successfully but Navisworks crashes while running. The debug message is the same 'Autodesk.Navisworks.Api.pdb not loaded'.  How to solve  it?

Message 7 of 10

I put the external library dll in the Navisworks.exe folder ("C:\Program Files\Autodesk\Navisworks Manage XXXX\") as a trial and it solved the problem.

Placing it in the Dependencies folder did not solve the problem in my environment.
If you want to place it in the Dependencies folder, you can set the PATH to "C:\Program Files\Autodesk\Navisworks\Manage XXXX\Dependencies" and pass it through.

I will note my case specifically.

I encountered this problem when using the JSON library (JSON.Net https://www.newtonsoft.com/json).
Specifically, I was able to work around the problem by placing "Newtonsoft.Json.dll" in "C:\Program Files\Autodesk\Navisworks Manage XXXX\".

Message 8 of 10
ulski1
in reply to: moon_pelican_cat

I guess the issue is Newtonsoft.json.dll comes bundled with Navisworks - Navisworks uses it. It is placed in the root folder. You should be able to use that file if you can use the version provided by Autodesk that is.
Message 9 of 10

Hello everyone,
I'm creating a plugin for Navisworks Manage 2024 and getting same error at call of my functionality leads to crashing issue of Naviswork Manange 2024.

aishwarya_karande_0-1694507324457.png

Tried to place my project dependencies at "C:\Program Files\Autodesk\Navisworks\Manage XXXX\Dependencies" as well as at "C:\Program Files\Autodesk\Navisworks Manage XXXX\" path but both ways are not working.
Kindly help or guide me to solve this problem.

Message 10 of 10

 I am getting same error as I already put Newtonsoft.Json.dll" in "C:\Program Files\Autodesk\Navisworks Manage XXXX\".

 

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report