Navisworks Timeliner API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm new to the Navisworks API and am trying to export all the timeliner information shown in image attached(timeliner.png) associated with all objects out to a txt file but can't seem to figure out how to do it. I've got the Item displayname(Revit name and ID) to export and the higher level Task information but can't seem to get down another level and get the items timeliner info. I've looked at examples but cant seem to get it work Can someone please help with this.
Here is the Item display name code I'm used not sure if this is even the approach to use:
using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using System.IO;
using System.Threading.Tasks;
using Autodesk.Navisworks.Api;
using Autodesk.Navisworks.Api.Plugins;
namespace BasicPlugIn
{
[PluginAttribute("BasicPlugIn.ABasicPlugin",
"ADSK",
ToolTip = "BasicPlugIn.ABasicPlugin tool tip",
DisplayName = "Sample Plugin")]
public class ABasicPlugin : AddInPlugin
{
public override int Execute(params string[] parameters)
{
string myPath = @"C:\Revit Projects\test.txt";
using (StreamWriter myText = File.CreateText(myPath))
foreach (ModelItem item in
Autodesk.Navisworks.Api.Application
.ActiveDocument.Models.RootItemDescendantsAndSelf)
{
string dname = item.DisplayName;
myText.WriteLine(dname);
}
return 0;
}
}
}
Thanks,
Nate