C# - How to get value in tab Configure of TimeLiner ?

Anonymous

C# - How to get value in tab Configure of TimeLiner ?

Anonymous
Not applicable

Dear all,

 

I'm using Navisworks 2016. I would like get value of the row in tab Configure of TimeLiner
See the attached images.

 

I tried it with code as below, but I am not able to do it:

 

IDocumentTimeliner tl = oDoc.Timeliner;
DocumentTimeliner tl_doc = (DocumentTimeliner)tl;

foreach (TimelinerDataSource oDS in tl_doc.DataSources)
{
    System.Diagnostics.Trace.WriteLine("\n DisplayName: " + oDS.DisplayName + "- ProviderName: " + oDS.DataSourceProviderName);

    foreach (TimelinerDataSourceField oTlF in oDS.AvailableFields)
    {
        System.Diagnostics.Trace.WriteLine("\n DisplayName:  " + oTlF.DisplayName);
    }
}

 

Is there a good C# example of how to do this?
Any tips on these will be great help. Thanks in advance.

 

Best Regards,
Minh

0 Likes
Reply
Accepted solutions (1)
670 Views
1 Reply
Reply (1)

Anonymous
Not applicable
Accepted solution

Hi Everyone,

 

I did it with the code as below:

 

SimulationTaskType smlTaskType = Autodesk.Navisworks.Api.Application.ActiveDocument.GetTimeliner().SimulationTaskTypeFindByDisplayName("Temporary");

System.Diagnostics.Trace.WriteLine(smlTaskType.DisplayName);

System.Diagnostics.Trace.WriteLine(smlTaskType.StartStatus.SimulationAppearanceName);

System.Diagnostics.Trace.WriteLine(smlTaskType.EndStatus.SimulationAppearanceName);

System.Diagnostics.Trace.WriteLine(smlTaskType.UnderrunStatus.SimulationAppearanceName);

System.Diagnostics.Trace.WriteLine(smlTaskType.OverrunStatus.SimulationAppearanceName);

System.Diagnostics.Trace.WriteLine(smlTaskType.SimulationStartStatus.SimulationAppearanceName);

 

I hope this is useful for anyone required!

 

Best Regards,
Minh

0 Likes