Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

Script for Renaming Multiple Grids

6 ANTWORTEN 6
GELÖST
Antworten
Nachricht 1 von 7
o.hatilov
675 Aufrufe, 6 Antworten

Script for Renaming Multiple Grids

Hi.
I am new to working with dynamo and dont understand how to rename multiple grids.

So I have the list of grids that we have in project, and I want to reanme it by the second list that I have. I need to change in Numeral grids (1s, 2s...) to (1c, 2c...) and Alphabetical (A, B, C...) to (А, Б, В...) and (As, Bs...) to (Ас, Бс...)

In two lists I write it in the same row the Name that I want to change. But it doesnt work. It work only if change the name one by one.

ohatilov_0-1645530089931.png

 

Tags (1)
Beschriftungen (1)
6 ANTWORTEN 6
Nachricht 2 von 7
RDAOU
als Antwort auf: o.hatilov

@o.hatilov 

 

Why don't you simply change/type them straight into the model. that would save you at least 50% of the time needed

  1. for retyping the existing names
  2. and for putting this graph together

Apart from that you could do better with the following nodes

  • Package: proruBIM Grids Renumbering

RDAOU_0-1645531724982.png

 

  • Then instead of retyping the existing names...simply get the value of the name parameter

RDAOU_1-1645532007490.png

 

 

  • Then comes the renaming part...Changing (1s, 2s, 3s...etc) to (1c, 2c, 3c...etc)
    • You can either use the node String.Replace to swap the s for a c

RDAOU_1-1645535496873.png

    • Or alternatively, ignore the existing name and use a couple of OOTB nodes to create a a running number + a suffix string and write that to the Grid name

RDAOU_2-1645535844172.png

 

 

 

 

 

I believe this should be sufficient to put you on the right track

 

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


Nachricht 3 von 7
o.hatilov
als Antwort auf: RDAOU

ohatilov_0-1645535854997.png

Hi, thank you so much for your help. It worked and I changed the numbers with S to C, but with Alphabetic should I make lots of Code Blocks, or there is another solution?

Nachricht 4 von 7
RDAOU
als Antwort auf: o.hatilov

@o.hatilov 

 

What do you mean exactly by alphabetic? You want to change the ABC to russian alphabit?

 

 

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


Nachricht 5 von 7
o.hatilov
als Antwort auf: RDAOU

Hi.

Yeah. I want to change from ABC to Ukrainian alphabet, but specificly the letter the I choose (for example from English A (1-st letter of Alpahbet) to Ukrainian Г (4-th letter of Alphabet) and so on. Thats why I think that if I have lists with letters in right slots it will change the same number of slot from 1. A to 1. Г and so on.

Nachricht 6 von 7
RDAOU
als Antwort auf: o.hatilov

@o.hatilov 

 

K, I think I know what you mean..In the original post you were trying to create List of original name and list of new name then use replace...which doesn't work with that node regardless of the lacing you try to use.

 

  • An easy and simplified way to do that is to just 1 complete list of all the new names then use  setparametervaluebyname to rename them all to new

 

  • Another more specific way is to use Dictionaries to change the name only specific grids (ie: replacing only portion of the list) see example below...

RDAOU_0-1645626701538.png

 

There are several other way  to do this  (also including replace) but these are the easiest I think

 

 

 

 

 

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


Nachricht 7 von 7
o.hatilov
als Antwort auf: o.hatilov

It worked) Thank You so so much)

 

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report