By Naveen Kumar
Description: The Appearance Profiler allows you to set up custom appearance profiles based on sets (search and selection) and property values. You can use them to color-code objects in the model to differentiate system types and visually identify their status. It can be saved as .dat files and shared between other Autodesk Navisworks users.
Autodesk Navisworks 2023 provides a command for appearance profiles. You can use Navisworks automation API and plugin to set appearance profiler to multiple Navisworks files.
Sample Code:
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"); navisApp.ExecuteAddInPlugin("AutoAppearanceLoader.Navisworks", @"....\AppearanceProfiler.dat"); navisApp.SaveFile(@"....\OutputFile.nwd"); navisApp.Dispose(); } }
The command can also work within plugin:
Autodesk.Navisworks.Api.Application.Plugins.ExecuteAddInPlugin("AutoAppearanceLoader.Navisworks", "c:\\temp\\AppearanceProfiler .dat");