Number sequence with prefix

Is there a way to create a number sequence with a letter prefix, such as X101, X102, X103…?

2015-07-27_10h10_39

String

@Mark Thorley I think we posted that at the exact same time! :stuck_out_tongue:

20150727-3

Oops. two other responses in the time I took to respond :slight_smile:

Too many replies? Ha-ha… There are never too many replies! :smiley:
2015-07-28_10-59-07

1 Like

Dimitar has beat me to replying to this but here is a variation to Dimitars reply for extra help.

Capture

Thanks Mark.

Don’t know if you remember, we met briefly at AU last year (I used to work for aecom)

All of these examples are great! This community is pretty awesome.

:mrgreen:

1 Like

For completeness… :slight_smile:
prefix

Yes I do! Will you be at AU this year? I’m going to try organise an evening of drinks with the usual suspects of the dynamo forum. Will be good getting us all in one room/bar.

@Dimitar Venkov - always showing us up :wink:

 

Dimitar’s approach is so uncomplicated, it actually makes me feel stupid :slight_smile:

1 Like

If I remember correctly, I originally saw Andreas use this method. Also I believe I’ve learned more things from you, Vikram than the other way around :smiley:

Now what would be fun is to try to achieve the opposite and try to find the most complicated way to chain strings and numbers together!

Hello All,

That’s the power of our DesignScript engine.

If you use Code Block more often then Nodes, you will definitely feel the power of DesignScript.

Thanks a lot everyone for awesome replies.

Keep Using Dynamo!

Thanks,

Ritesh

 

There is always one that has to get the pythons script out :).

 

It is good to see all the variations to this fairly simple idea.

Great Topic! THANKS to everyone! How about suffix? for example, how to add “mm” to a list 9, 12.7, 3, 2.5, 5, 7, 1.25, make a new list 9mm, 12.7mm, 3mm, 2.5mm, 5mm, 7mm, 1.25mm?

I found a way below, is there any better one?

Ignoring the trailing zeros on converting to a string.

Adding a suffix…

20160516-3

Slightly off topic, but add leading zero:

AddLeadingZero

20160516-7

1 Like