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
Solved! Go to Solution.
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