@xiaodong_liang wrote:
Hi,
Are you add this Autodesk.Navisworks.TimeLiner.dll from <Naivisworks 2012>\ ? I never heard such issue. The first I can think of is something wrong when you install Navisworks. You would need to repaire / reinstall. Or you could use .NET reflector http://www.red-gate.com/products/reflector/ to see anything missed.
Y, I am using Naivisworks 2012 and I used .Net reflector and did not find anything missed and even used fusion (assembly) log viewer and sorted out everything, still no use.
Well, I have already worked around this by exporting the timeliner to a .csv file from navisworks manage 2012 appllication and I read the file from the application and got what i needed. The only thing is that I needed to make some modifications to the file as some of the Item names in the selection sets are different form the ones that in the attached to task in the timeliner properties. (I know they are the same as they refered to the same selected modelitems in the document) so, I had to modifiy some of the names in the file to match those in the selectionsets as this is how i get the selected items from document.selectionSets.
more formaly Invoke the following method:
private ModelItemCollection getSelectionByDate(DateTime[] EDates, String[] Items, DateTime date)
{
int y = 0; SavedItemCollection si = documentControl.Document.SelectionSets.Value;
ModelItemCollection modelItems = new ModelItemCollection();
while (y < EDates.Length)
{
if(EDates[y] == date)
{
int j = si.IndexOfDisplayName(Items[y]);
SelectionSource ss = documentControl.Document.SelectionSets.CreateSelectionSource(si[j]);
Search s = new Search(); s.Selection.SelectionSources.Add(ss);
modelItems = s.Selection.GetSelectedItems(documentControl.Document);
break;
}
y++;
}
return modelItems;
} I know this may not be the best approach to do it and you cannot atomatically do it on a navisworks file. As I said, first the timeliner is exported to a .csv then some modifications made to it inorder to work, but at least it solved my problem for now. Thank you.