Problem statement
I am trying to export the NWD file to DXF via C#.
What have I done till now?
I have created a plugin to call this below method POCMethod(string pa) which exports the active document to FBX. After the file is converted to FBX, I am planning to convert the files to DXF using some DLLs of 3D Max.
public class ExportNWDAsDXFPlugIn : AddInPlugin
{
public override int Execute(params string[] parameters)
{
if (!string.IsNullOrWhiteSpace(nwdFilePath))
{
if (result == true)
{
POCMethod(nwdFilePath);
return 1;
}
}
return 0;
}
private void POCMethod(string pa)
{
try
{
PluginRecord FBXPluginrecord = Autodesk.Navisworks.Api.Application.Plugins.FindPlugin("NativeExportPluginAdaptor_LcFbxExporterPlugin_Export.Navisworks");
if (FBXPluginrecord != null)
{
if (!FBXPluginrecord.IsLoaded)
{
FBXPluginrecord.LoadPlugin();
}
}
Plugin FBXplugin = FBXPluginrecord.LoadedPlugin as Plugin;
FBXplugin.GetType().InvokeMember("Execute",
System.Reflection.BindingFlags.InvokeMethod,
null,
FBXplugin,
new string[] { pa });
}
catch (Exception ex)
{
throw;
}
}
}
Problem
Solved! Go to Solution.
Solved by tetsuya_miwa. Go to Solution.
If you want convert multiple files, call Roamer.exe with proper arguments for each file.
https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/How-to-automate-th...
Can't find what you're looking for? Ask the community or share your knowledge.