Code block as input?

Hi there,

I’ve created a script wich help on this forum wich allows me to number structural foundations (see last post) but I want to use the script with dynamo player. Since it’s not possible to use a code block as input I’m looking for an alternative

The code block is called “Startnummer” in de picture.
the most ideal situation is (if its possible) to create input for for the first " ", for the 0, the 1 and the last " ".

The first " " is used as a prefix,
The 0 is used for numbering from 200 or 300
The 1 is used as first number in the mark input
The last " " is used as a suffix.

I’m hoping someone can help me with the solution.


1 Like

I think Data Shape package will best suite this.

use the string node…there you can select “input” for dynamo player

Use a String node and change the name to ‘prefix’ for the “ “ prefix. Set this as an input.
Copy that node and change the name to ‘suffix’ for the suffix. Ensure this is an input.
Use a number node and set the name to ‘hundreds value’. Set it as an input.
Then copy that and change the name to ‘starting value’.make sure input is enabled.
In your code block change the text to something like:
pref + ( hunds ( startval .. c ) ) + suffix ;

Then wire in the four input nodes.

As noted Datashapes will allow for a more friendly user experience here, but you’ll still have to assemble the code block from the various inputs as noted here.

Thanks guys, it’s working perfect.