Ah, cool. I may try that if Dyno ever flakes on me.
I do have to say, though, Dyno has been rock solid for creating a ribbon of buttons like what pyRevit does (although pyRevit offers WAY more outside of custom ribbons). Only disadvantage is that Dyno is yet another add-in to make sure is installed. Plus, it will only works on Revit 2019 OR 2020+. So, we had to abandon the custom ribbon in 2019.
I also like how Dyno allows the names of the dyn files to remain whatever you want them to be. Maybe pyRevit has changed this, but it used to be that you had to name the file script.dyn or something like that. So, when you open Dynamo to edit a file, you just see a bunch of files named script.dyn in the recent files.
Definitely gonna start some Python tutorials. I wonder if my aging brain can handle another language…
I can see how it could be very useful when wanting to use custom nodes in DesignScript. I think I see how it works, but I don’t know enough about it to troubleshoot what I get from it.
Created this custom node for the above definition …
While this might work, I’d discourage you from pursuing this approach unless it somehow fits well into your current style of working. There are less convoluted and more exciting things to explore in Design Script
Also, I stand corrected regarding the Custom Node requirement. Seems like you could use String.Contains without creating a redundant custom node, but you should avoid any default inputs in __ApplyList
Since this post is closed please outline/describe what you’re trying to achieve in a new post (preferably with screenshots of your attempts) and I’m certain you’ll get fairly straightforward suggestions that don’t involve __ApplyList
@pbermel already set me straight on the DS native option in lieu of __Apply. So, I’m good to go on the original question. The rest of this discussion was just extra knowledge building.
Thanks!
For naming your script files - all pyRevit expects is script to show up before the extension. So you can call your scripts whatever you want. For instance - This is my Program_script.dyn - works just fine. pyRevit will pick up the first *.py or *.dyn it finds with the string _script in the name.
There are also ways to have your script file pulled from another location with the pyRevit commands, but that is getting deeper into the structure and custom commands in pyRevit.
icon.png doesn’t follow this rule however. It would be nice if it did. So, yes, all your icons are icon.png.
Essentially the ScopeIf node has always done this, we just didn’t have a very good description on it. The description I posted above is the updated one that should be out in 2.13. The VM will only execute a singular branch dictated by the True or False values
Note in the image below that neither branch touches, and neither branch’s nodes show an execution (i.e. they return Null) but the overall ScopeIf node does return the value from your chosen branch!
Fun Fact: The ScopeIf node is probably the most complex node written in Dynamo.