Hi @JFN_KSH ,
I am not able to understand your issue fully.
I need some more explanation.
I have a suggestion from the information you shared in your posts.From my understanding, You can try using Navisworks Automation API.
Did you take a look at Navisworks Automation API?
https://apidocs.co/apps/navisworks/2018/87317537-2911-4c08-b492-6496c82b3ed7.htm
https://apidocs.co/apps/navisworks/2018/87317537-2911-4c08-b492-6496c82b3ee0.htm
https://forums.autodesk.com/t5/navisworks-api/navisworks-manage-starting-automation-and-selecting/td...
Using Navisworks Automation API, you can execute your addin plugin without any user interaction(even without opening Navisworks-I think NW runs in the Background)
1)Create a plugin. (let's call it plugin NWPlugin)
2)Create a console project.An .exe file will be created. (Let's call it example.exe)
3)Here is the sample code of the console project I used
class Program
{
[STAThread]
static void Main(string[] args)
{
String runtimeName = Resolver.TryBindToRuntime(RuntimeNames.NavisworksManage);
if (String.IsNullOrEmpty(runtimeName))
{
throw new Exception("Failed to bind to Navisworks runtime");
}
XMain();
}
private static void XMain()
{
NavisworksApplication navisapp = new NavisworksApplication();
navisapp.AppendFile(@"...\inputFile.nwd");
//Navisworks plugin you already created
// [PluginAttribute("Navis2023", "ADSK", ToolTip = "Run 2023 code", DisplayName = "Navis 2023")]
navisapp.ExecuteAddInPlugin("Navis2023.ADSK");
Console.WriteLine("Plugin Executed");
navisapp.SaveFile(@"...\outputFile.nwd");
navisapp.Dispose();
Console.ReadKey();
}
}
4)In the sample code you will see I used NW application API. Append your file, execute your plugin(NWPlugin), and save your output file after executing the plugin.
5)You can execute example.exe directly from the command prompt.
If this doesn't help, I need some detailed explanation.
It will be helpful for me to check with the engineering team for you.
Naveen Kumar T
Developer Technical Services
Autodesk Developer Network