Hide model items
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.ActiveDocument.Models.SetHidden(oExplicitSel, false);
}
}
}
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.