Grid renaming direction for ALPHABETICAL

HELLO EVERYONE,

I M NEW LEARNER WITH DYNAMO. :slight_smile:
THIS IS MY FIRST POST HERE AND I M TRYING TO CHANGE THE DIRECTION OF RENAMING GRID WITH ALPHABETIC.

I TRIED List.Reverse NODE BUT RESULT IS NOT COMING AS I WANT.

AS YOU CAN SEE HORIZONTAL GRID IS STARTS FROM Q,R,S,…

IS THIS POSSIBLE TO CHANGE GRID NAMING FROM TOP TO BOTTOM?

DID I MISSED SOMETHING?
IS THIS POSSIBLE?
PLEASE LET ME KNOW,
(sorry for my bad English)
THANKS :slight_smile:

Currently you’re producing a list that looks like this: {a, b, c… x, y, z}.
Reversing that list is giving you: {z, y, x… c, b, a}.
What you need to do is limit the list of characters to the same length as your list of grids. So:

  • run a second wire from the list of horizontal grids to a List.Count node
  • Modify the Code Block(FOR HORIZONTAL GRID) to read:
    1…x…1;
    true;
  • Wire the results of the List.Count node into the x value on the code block.
  • Wire the resulting list of numbers to the n input on the Character.FromNumber node, and the true value into the upperCase input (you’re feeding a list of numbers into a “true/false” input at the moment, but the node is powering through it)

The rest of the script should run fine as it is.

Pop a few watch nodes in along the way to see the results you’re getting - should help you troubleshoot as you go. If that doesn’t work let me know and I’ll take a crack at it.

Hope this helps.

2 Likes

thank you very much for quick reply JACOB,

Its work like a charm,

but now i found another problem, numbering is not coming sequence. check image below.

i realize this error come from starts.(i think something wrong with Grids.Renumerate node
and i dont know how to fix it.

and i have few questions if you don’t mind :innocent:

1.if we want to start grid from J to S when how can we do this, i used List.DropItems but not success.
2.can you explain (1…x…1) in code block.

thanks,

The grids remunerate appears to be working fine. It numbers the grids in the order in which they are fed in, so if you feed them in a different order then you will get the right results. Try using a select elements by curve node instead of the all elements of category you are using - I believe that will put them in the order you want.

https://www.google.com/amp/s/dynamonodes.com/2016/01/24/select-elements-by-curve/amp/

To start with J I would build a list of every letter A to Z. Then use a ‘string.indexof’ to get the number of the letter you want. Then add that to the list.count node from before. Then convert to the alphabetical sequence as before. Then a list node to remove the result of the string.index of from the front of the list. (Can’t remember name and I’m traveling so hopefully you can find this one with some trial and error).

The code block 1…x…1 defines a sequence of numbers from 1 to x stepping up 1 each time.
Look here for more info:

http://dynamoprimer.com/en/07_Code-Block/7-3_shorthand.html

1 Like

[quote=“JacobSmall, post:4, topic:8523”]
select elements by curve node
[/quote] thanks for the mention @jacob.small! There’s actually a select grids by curve now which is more stable. It will order them based on how the curve goes through.

2 Likes

you can consult:

AGAIN THANKS JACOB :slight_smile:

AND ALSO @john_pierson :slight_smile:

I FOUND THIS SOLUTION WITH YOUR HELP

SEE IMAGE :slight_smile:

i used Select Grids By Curve node.(thanks to Rhythm)
i have different direction for renaming so i used two lines.

ITS WORK FOR ME GREAT.
and for start grid J to X i will write code block. “j”,“k”,…etc. its fine.

i am a new learner so these steps are good for me.

and sorry to @xaydungxt.36 i cant use your method, because i am a new learner and i am not ready for PYTHON SCRIPT . i appreciate your help.

again thank you very much :slight_smile:

1 Like

Hello there! How can I load this Dynamo Script? I am having some problems, for example, I can’t find the “Select Grids By Curve” node! What is the procedure?

Thank you very much!

@teixeiranh The Select Grids By Curve node is in the package Rhythm

1 Like

Where to get the Grids.Renumerate node? Prorubim?

Yes!

Thanks. Just for the record, the node is in the Deprecated package

Thank you!

What about the “Grids.DivideByOrientation” node? What is the package?

Hello, Where can we find Characters.FromNumber Node? or what is its equivalent in 2021? thank you

@LanggamanXavierMasse
This may work in a similar way…https://www.google.com.au/amp/s/dynamonodes.com/2016/01/19/numbertocharacter-az/amp/