pyrevitlabs / pyRevit

Rapid Application Development (RAD) Environment for Autodesk Revit®
http://wiki.pyrevitlabs.io
GNU General Public License v3.0
1.33k stars 337 forks source link

pyRevit is running a dynamo script on its own? #799

Closed Tyree closed 4 years ago

Tyree commented 4 years ago

I've been using pyRevit to set up a ribbon with some custom dynamo scripts. It works great.

I just set up a Dynamo script that allows me to change titleblocks on sheets without opening the sheets. The script works great if I run it manually, but I get strange behavior when I use pyRevit to run it.

The Dynamo script uses Data-Shapes UI. When run, a box pops up and let's the user check any sheets to change the titleblock on and then gives a list of titleblocks loaded in the file to choose from. Click the submit button and it changes the titleblock. That much works fine.

Then the UI pops back up on its own. Weird.

Then I realized if I change the titleblock manually by just clicking on it and changing its type, the Dynamo UI pops up again.

So, I'm assuming since the script is set to automatic, it just keeps running itself again each time the titleblocks in the Revit file change.

I'm not sure if this is even something pyRevit can solve. Just curious if this issue has been dealt with before.

Thanks! Matt

eirannejad commented 4 years ago

So pyRevit asks the running Dynamo to execute the script. This issue sounds similar to this. Read the thread as it might have useful information for dynamo bundles.

See if turning off the engine:automate will fix the issue please.

engine:
  automate: false
Tyree commented 4 years ago

No luck with adding the:

engine:
  automate: false

I'll look at that thread and see if it can help.

eirannejad commented 4 years ago

Need example to test. Open the issue when a test dynamo file is available