Community
Navisworks API
Welcome to Autodesk’s Navisworks API Forums. Share your knowledge, ask questions, and explore popular Navisworks API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Timeliner API Tasktypes

1 REPLY 1
SOLVED
Reply
Message 1 of 2
Anonymous
728 Views, 1 Reply

Timeliner API Tasktypes

Hello,

 

I am somewhat used to Navisworks API. However, this is the first time I try to use Timeliner. I am using VB.net and Navisworks 2013. I am trying to create new tasktypes and associate SimulationStatuses for them. I have no problem creating the a blank tasktype and point one of it's SimulationStatus (eq. StartStatus) to something other than UserAppearance mode. But, when I try to set it to UserAppearance and give it a name in SimulationAppearanceName, NavisWorks reports and error and shuts down. The way I am creating the tasktype is like the code below. ttname contains the tasktype name and startapp contains the name of the appearance I want to assign (eq. "Red (90% Transparent)"). The main goal for this plugin (this is not a Timeliner plugin, as I don't want to create a new way of importing tasks; it is a simple AddInPlugin) is to batch exporting simulation AVIs. I supply a bunch of CSV files, the plugin returns AVIs with the same name.

 

Thank you very much for your help!

Daniel

 

       

If Not CheckTaskTypeName(ttname) Then

            nw =

New Autodesk.Navisworks.Api.Timeliner.SimulationTaskType

            nw.DisplayName = ttname

            nw.SimulationStartStatus.AppearanceMode = Autodesk.Navisworks.Api.Timeliner.

SimulationAppearanceMode.Hidden

            simst = nw.StartStatus

            simst.AppearanceMode = Autodesk.Navisworks.Api.Timeliner.

SimulationAppearanceMode.UserAppearance

            simst.SimulationAppearanceName = startapp

            nw.StartStatus = simst

            tml.SimulationTaskTypeAddCopy(nw)

       

EndIf

 

 

 

1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

Hello again,

 

It seems the code above works fine. I have no reason why it didn't work before. I thought it would be the fact I didn't have any models loade, but it's not the case. I ran this plugin with no models and no errors.

 

Thank you

Daniel

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report