Script runs perfect in Workspace but does not work in the Dynamo Player

Hi all,

I have made a script that exports a specific view to Navis in a certain location with a certain name as you can see below.

I have used ForceChildrensEval node but I believe that this is used only for running straight from the Workspace and on the second run. Sometimes the script works also if I connect the FilePath.DirectoryName straight to the Directory path but I have the same issues when running it from the player. Any idea what is causing this issue and what is the difference between running a script from the Workspace and player ?

why did you use the node FilePath.Directoryname twice Řź

1 Like

It was late in the night and I was tired :slight_smile: Changed it afterwards but still not working.

Thanks,

can you run the script and show to us every node output ?

Sure can please see below screenshot,

For some strange reason the script work after pressing the Run button for the second time. I can share also the script itself it makes any difference. ( To get that 3D view I have another script in the Playlist that generates it )

Thanks,

for FilePath.FileName, the input for withExtension is bool not string, and it should be false in your case.
but i believe it is not the reason.
have you check if it is a permission issue ?
share it if you have no problem

Thanks for the help Khuzaimah,

Just so you know, I am trying to automate the model federation process process with a dynamo scrip. I am using it to generate a 3d View, set my view parameters, clean annotations, remove imported dwgs and at the end export the view to nwc format to federate it in Navisworks from where I can later export it to Revizto. Seems to work alright until the point of the Export which sometimes works and sometimes doesn’t. Any idea on what I am doing wrong ? I have added screenshots of the script and also the script if it help.

Full dynamo script.dyn (29.4 KB)

that is weird, the same is for me, the script works after second run,
@Mostafa_El_Ayoubi , this node from your package if you please can help in this.

That might be because in the first run it is not finding the view. In the 2nd run because the view is created in first run and able to find it. Try changing the view node to string and get view by name or similar node.

i have thinking about that, and i tried to choose a view already created but it is the same reasult

Thanks for trying :slight_smile:

1 Like

Sorry little late to the party, don’t know if you had any success, it’s been a while but I had this same problem creating a data export and then utilizing the result. I had to split my script to get the data from Revit and a second script to ship the data out. we ended up just runing them sequentially in player. There is also a “pause” node (i think springs package). Might be worth a shot to see if you can stall the process as Revit creates or exports the view.

I had a similar issue exporting to navisworks and I was able to have success utilizing a transaction start/end node before the export node. I’m not sure how it causes it to work but it allows for player to actually export views.

Hello everyone,

unfortunately I have the same issue. I would like to know if this topic was resolved somehow?
Do you know what can cause this behavior?

@JessWill how did you work it out?

Thank you in advance.

@IKK , hi

Which Dynamo and Revit Version do you use…? Is a a college running the script?

Are the packages correct?

Hello,

thank you for your reply.
We are using Revit 2021.1.3 and Dynamo 2.6.1
Packages are correct and we have the same situation on several PC.