0% found this document useful (0 votes)
96 views

Renaming Grids "Dynamo Script

The document describes a Dynamo script that renames all grids in a Revit project into an arranged alphabetical list. It details the main steps of the script which include selecting grids, converting them to lines, extracting Y coordinates, sorting by Y value, determining a naming range, and renaming the grids. It notes that random naming had to be used to avoid naming conflicts.

Uploaded by

engislam6294
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views

Renaming Grids "Dynamo Script

The document describes a Dynamo script that renames all grids in a Revit project into an arranged alphabetical list. It details the main steps of the script which include selecting grids, converting them to lines, extracting Y coordinates, sorting by Y value, determining a naming range, and renaming the grids. It notes that random naming had to be used to avoid naming conflicts.

Uploaded by

engislam6294
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Renaming Grids

Dynamo script
Presented by: Mohamed Abdelaty
Introduction
Script Description
This dynamo script allows you Renaming all Grids in the
project into arranged list.

Main propose

Arrange all grids named from “A” to “Z” randomly according


to Alphabetical order.
Steps
1) Selecting grids

By calling “select model element” node


we would be able to select any elements
from revit model with its ID.
Steps
2) Converting grids to lines

By calling “Grid.Curve” node we


would be able to convert
selected grids into lines defined
by its start and end point.
Steps
3) Extracting “Y” Coordinates

By calling “Curve.Y” node we


would be able to extract “Y”
coordinates from Tow points
of line.
Steps
4) Sorting “Y” Coordinates

By calling “List.sort by key”


node we would be able to sort
“Y” coordinates from min. to
max. values.
Steps
5) Organizing Process

Once we finished sorting


phase we had to organize
our phase prosses
Steps
6) setting naming range

By calling “Range” node we


would be able to determine
the naming range of grids.
Steps
7) Renaming grids

By calling “Element.set
parameter by name” node
we would be able to select
any parameter from
elements.
It will be the “name”
parameter for this example
So this node will renaming
the grids name with the new
range of names.
Steps
8) Error after running

It means that while


renaming grids, at specific
grids revit found a grid with
the same name which
causes a non-complete
script.
Steps
9) naming grids randomly

To solve this kind of problem we


decide to naming grids randomly out
of alphabetic sequence.

By calling “Math.Random list” node


we would be able to naming grids
with random values.
Steps
10) Linked random names to range naming of grids

After naming grids


randomly with we repeat
the same prosses of
naming grids with a range
name from “A” to “Z”.
Steps
7) Problem solved

You might also like