Grasshopper

algorithmic modeling for Rhino

How to Differentiate Strings that are bundled into one item

I am reading data from arduino's serial monitor and unfortunately, each item contains multiple strings. I am attempting to differentiate each line from apparent paragraph and keep the individual lines intact so that I can edit them. Is this possible? Thanks

Views: 549

Attachments:

Replies to This Discussion

Hello johnny,

this could be a way

split uses is space as separator. if the thext structure is the same in all data this could work.

best

alex

edit* i saw th intact keyword after i posted. this is not intact, the spaces from the initial block# descriptions are missing. i will try to get it with the needed spaces.

Thanks Alex!

This is exactly what I was looking for. Much appreciated. 

Hey actually, I have run into another variation of this problem. I am getting some branches at twice the length they need to be. 

When using the dispatch after the split list component, the dispatch component naturally complains when it is fed zero values. 

Is there a way to get around this? my goal is to keep every branch at 12 or 13 items. After the split list there are some conditions where branches are 24 items. I am having a tough time figuring this one out. Thanks in advance. 

Thanks in advance. 

Attachments:

Hello,

you need somehow to standardize your info stream. otherwise you will end up getting mixed up partitions.

the following works with trees with possibly many irrelevant info in text, nonsense paragraph change in between values. but the red part needs to be constant. i am not sure though that it covers all weird stream values text formatting.

best

alex

Attachments:

Very impressive string surgery here. I appreciate it!

Also, I agree that it would make life easier to have cleaner or better organized data coming into firefly. I will look at my arduino code in order to see if I can modify the code somewhat.

Once more, this is great logic. 

Thank you for the help. 

- Erik

great! i am trying to locate a threat, where something similar was addressed with python script. not sure if the data was well organized, but was 3 lines of code...

will keep you posted if i find it.

best

alex

*thread

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service