Dynamo player running differently then Dynamo editor?

While working on a script I ran into a bizarre issue I was hoping someone else ran into before:

So I wrote a little script which simply goes through my active views and tags all my pitch fork hangers (specifically the rod length).


When I test the script from the dynamo editor the results show up like this and everything’s the way I want it.


However, when I go to my dynamo player and try running it, it takes about twice as long and the tags show up in the wrong place. (The far right block of the first pic was me specifying where I want the tags to show up).


This is a reproducible issue and I’m deleting my old tags before I run it so everything should be starting fresh. Has anyone seen this before and knows how to fix it?

This is an issue for another very similar script I’m working on where I have multiple tags that are all showing up right on top of one another.

Note: I’m fairly new to dynamo so there’s a real chance I’m missing something obvious.

Unfortunately I can’t help with your actual problem with the tag leader differences…

However, from what I understand it takes longer for scripts to run with Dynamo Player than through Dynamo as when you hit ‘Run’ it has to launch Dynamo, wait for that, and then run the script.

That leader issue seems very odd though.

My scripts do run (most of them whitout errors), giving the results, but sometimes with errors and results involved. You never know where the culprit is until we can have a look under the hood.
Can you show us a screenshot of the Dyn with previews enabled ?

I’d be happy to but I’m not sure how to do that. Under the view tab, background 3d previews shows everything’s on. The entire script is shown in that first picture I in the original post though.

Sorry, as I said I’m very new to this.

Some relevant information that I just discovered:

Due to an unrelated issue I had to restart Revit. When I booted it up and ran the script, the first time it ran it had the issue that was the the cause of the post but the second time I ran it, it ran correctly.Besides making me thoroughly confused (because I did nothing besides press run again) I’m pretty sure that’s where the issue is.

Sorry i didn’t look at the first picture, my bad.
Having a look at it now makes me wonder why you use the z coordinate for the vector.
Can you try it with vector by two points?

The z coordinate was in case I ever wanted to tag it in a cross section but it doesn’t really matter.

No luck. I tried it with that and it behaved the exact same way.

I mentioned in my follow up comment that this only acts this way on the first time running it. I’m pretty sure that’s what’s going wrong but I haven’t any idea as to why. Have you ever heard of anything like that before?

i heard about that many times in many different situations, although this one is new to me.
the solution in many other cases is restarting Revit.
it has something to do with memory getting stuck.

Can you try giving Revit some new life?

Can I get a copy of the dyn? Feels like element binding may be partially to blame on the slow first run.


I restarted my computer just to be on the safe side. No luck but good idea.


Sure, here: Tag Rod Length (Pitch Fork Hanger).dyn (12.7 KB)


Any luck?