Navisworks API

Reply
Member
muaz.al.jarhi
Posts: 3
Registered: ‎03-07-2012
Message 1 of 6 (531 Views)
Accepted Solution

TimeLinder.dll error

531 Views, 5 Replies
03-17-2012 01:13 AM

Hello,

 

Im trying use AutoDesk.Navisworks.TimeLiner.dll in a c# app to get the TimeLiner properties of the models of a navisworks document in a c# but i get the following error (although i added the dll as a refrence in thr app):

 

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.

 What dependencies does the TimeLiner.dll depend on. I may have missing some dependencies but i do not know. Can you list all the dependiecies for me? Or else how can I resolve this problem? I am having a hard time trying to resolve this problem and need it to be resolved in the earliest time possible. Thank you for your understanding.


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.

 

ADN Support Specialist
xiaodong.liang
Posts: 1,276
Registered: ‎06-12-2011
Message 2 of 6 (518 Views)

Re: TimeLinder.dll error

03-27-2012 07:10 PM in reply to: muaz.al.jarhi

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.

 

 



Xiaodong Liang
Developer Technical Services
Autodesk Developer Network

Member
muaz.al.jarhi
Posts: 3
Registered: ‎03-07-2012
Message 3 of 6 (513 Views)

Re: TimeLinder.dll error

03-28-2012 01:07 PM in reply to: xiaodong.liang

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.

 

Contributor
karteek.iitm
Posts: 12
Registered: ‎02-24-2012
Message 4 of 6 (443 Views)

Re: TimeLinder.dll error

10-02-2012 10:27 PM in reply to: muaz.al.jarhi

I too have the same problem. Could anyone suggest why it 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.
Valued Contributor
GeomGym
Posts: 94
Registered: ‎03-25-2012
Message 5 of 6 (232 Views)

Re: TimeLinder.dll error

03-10-2014 10:38 AM in reply to: karteek.iitm

I get the same error if I reference a duplicate of this file.  If I reference the file in the installed location it works fine.  No idea why though

 

 

I shouldn't have installed the service release of navis on my build machine, unless I downgrade means it's near impossible to support the earlier build of navisworks.

 

ADN Support Specialist
xiaodong.liang
Posts: 1,276
Registered: ‎06-12-2011
Message 6 of 6 (222 Views)

Re: TimeLinder.dll error

03-12-2014 10:04 PM in reply to: GeomGym

Hi,

 

I guess you were just to ‘build’ your product without Navisworks being installed, and not to try and run it without Navisworks being installed, similar to AutoCAD SDK which provides the references of .NET API, and lib & head files for ARX application. From a technical point of view you would be ok just building against the required assemblies, but I think the dll of Timeliner depends on some other dlls which locate at Navisworks Installation path. It may not be an independent dll which could be deployed separately. 



Xiaodong Liang
Developer Technical Services
Autodesk Developer Network

Announcements
Autodesk Alert | We are currently working on restoring Previous Version License request access in the Autodesk Subscription Center. If you are a subscription customer and would like to request a Previous Version License, please use this link as a temporary workaround. We apologize for the inconvenience and thank you for your patience.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.