DesignScript Novice - What am I missing here?

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. :slight_smile:

Definitely gonna start some Python tutorials. I wonder if my aging brain can handle another language… :smiley:

I don’t think it works anymore. Probably was last discussed here over 5 years ago

Don’t think you’ll miss it though (I’ve never ever used it)

2 Likes

It definitely still works. I ran across it when forking a Spring Nodes (v204.1.0) Feet.ToFraction node to alter its output format a couple days ago.

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.

Tried it now and it seems to work. But seems like you need a custom node.

Created this custom node for the above definition …
string_contains_2021-09-30_05-31-39

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 :slight_smile:

Indeed. I will always prefer to do things without something like __Apply if there is a DS native way to do the same task.

More importantly, is that some theme you have on Dynamo to make it dark? :smiley:

1 Like

Its a recent daily build available at Dynamo Builds

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. :slight_smile:
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.

1 Like

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 :blush:

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.

2 Likes

So long as the output of the node before it is “Function” (i.e. not all inputs satisfied) it should work :slight_smile:

That’s great! Thanks for the detailed explanation!

1 Like