Grasshopper

algorithmic modeling for Rhino

Hi all,, I've a problem with the format function.

I want to create a piece of code for processing and arduino: array of numbers.

What i want to obtain, for example, is something like this:

int pointX[]={ 0, 100, 35, 0, 200, 35, 350, 289, 304, 523, 234, 123};

With much more number, but the concept is it.

I have two problem:

1 - I can't insert it "{" in the format text because he think is a variable declaration.

I think i could solve this 

2 - I',m not able to insert the numbers all together, it create a concluse line for every number, like this...

int pointX[]={ 0,};

int pointX[]={ 100,};

int pointX[]={ 35,};

...

Views: 2371

Replies to This Discussion

How about something like this:

Thank you, yes I did something very similar in the end and it seems to work.

But I would to know if there is a wat to do it just with the Format componen to have less element.

Would be better with longer codes.

The important thing is the String Join with the "," so that you get one variable for the contents of {}

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service