Autodesk Navisworks API
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Hide model items
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
I am trying to read selection items for tasks in timeliner and trying to hide them using API.
this is the code for the same.
foreach (Tl.TimelinerTask oTask in tl_doc.Tasks)
{
DateTime date2 = oTask.ActualStartDate.Value.Date;
int result = DateTime.Compare(date1, date2);
if (result > 0 || result == 0)
{
Tl.TimelinerSelection oTlSel = oTask.Selection;
if (oTlSel != null)
{
if (oTlSel.HasExplicitSelection)
{
Nw.ModelItemCollection oExplicitSel = oTlSel.ExplicitSelection;
}
Autodesk.Navisworks.Api.Application.ActiveDocumen
}
}
}
But when i debug the program it says "the name 'oExplicitSele' does not exist in the current context. Can anyone please explain how to hide selection items attached to a task.
Re: Hide model items
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
It is C# and you are using oExplicitSel in the brackets, right? I beleive you have figured it out after posting the question ![]()
Xiaodong Liang
Developer Technical Services
Autodesk Developer Network
Re: Hide model items
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thank you for your reply Mr. Xiaodong Liang.
When i run the code I am facing the following error (although i added the dll as a refrence in thr app). Can you please explain why this is happening.
System.IO.FileNotFoundException: Could not load file or assembly 'Autodesk.Navisworks.Timeliner.dll' or one of its dependencies. The specified module could not be found.
Re: Hide model items
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I have also added all the dependencies through .net reflector.
Re: Hide model items
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Please take a look at this post. Hope you could find what you missed.
http://adndevblog.typepad.com/aec/2012/10/timeline
In addition, please switch the .NET framework to 4.0 if it helps.
Xiaodong Liang
Developer Technical Services
Autodesk Developer Network
Re: Hide model items
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I developed my code based on the link which you have provided and did not miss anything.
.NET Framework 4.0 does not help too.
Re: Hide model items
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
So, I believe your app is a standalone EXE of .NET control. Unfortunately TimeLiner/ClashTest has not exposed to .NET control. you can only use them in a plugin.
The possible way I can think of is: you create an automation and plugin. plugin accesses timeliner and writes the info you need into a temporary file. When your app of .Net control wants to get timeliner info, it launches the automation, the automation starts a process of Navisworks (invisible), executes the plugin. finally, the app pf .Net control reads the temporary file and gets the info.
Xiaodong Liang
Developer Technical Services
Autodesk Developer Network
Re: Hide model items
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
That helps a lot. Thank you for the information.
Re: Hide model items
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
you havent included the .dll file in references. please find it in navisworks freedom folder. cheers.
Re: Hide model items
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi dickinsjohn,
I am not sure which question you are answering. But please note: no API for Freedom.
Xiaodong Liang
Developer Technical Services
Autodesk Developer Network


