Grasshopper

algorithmic modeling for Rhino

I know this is simple but I'm new to GH and I can't figure it out...  I have swapped a list of numbers for letters but I want them to read A1, A2, A3, A4 etc.

I've read quite a few threads about formatting masks but haven't found what I'm looking for, ideally I'd like to do it that way rather than plug in more bits as it's getting clunky.

Thanks in advance!

Views: 669

Replies to This Discussion

Done this in the uploaded code but if it does not work you just need to put this in an expression component

Format("A{0}", x)

Update:  If you use a series component to denote the list of numbers you can just edit the expression to read:

Format("A{0}", Int(x))

Attachments:

Matt, that's spot on, thank you.

In the famous closing words of Columbo. Just one more thing...  The sequence of numbers are from a different area which is created from other functions - I'm not using a list.

How do I move the returned value one decimal space so that I'm left with A1 rather than A1.0?

I could use your format line with sequence but I can't get that to count from 1 to 20+ when it gets to 10 it's returns 1 then 0.

Thanks again!

Sorted it - might be dirty but it works :)

If you want to use Concat just put an Int component between the series and the B input.

If you use the expression option just put this in the expression it includes the A already.

You just need to plug the series into the x input

Format("A{0}", Int(x))

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service