Change Revit Grid Extents for all views in project

Hi,

I would like to change the grid extents of all the views in a project, based on the crop region of each view.

I followed ideas given in the post “Change Revit Grid Extents”, and managed to make it work for one view (thanks to @ali.tehami, I basically took his graph and modified it, he made an awesome job). then I tried to adapt all the python scripts and nodes to make it work with multiple views.

I think that I’m close to the goal, but get the following error on the python script that is in the “Set new extent in view” group (on the right, second to last node) :
“”"
File “”, line 44, in
Exception: The curve is unbound or not coincident with the original one of the datum plane.
Parameter name: curve
“”"

I can’t understand this message, and how to solve that problem…

Could someone please help me?
I’m fairly new to dynamo and python in dynamo, so the mistake could be simple… or not…

You will find my graph in attachement
GEN_Ajuster_Quadrillage_a_cadrage_TOUTES_vues_DYN2-6-1.dyn (121.5 KB)

Hi,

Does someone have an idea?
Is there a way to help you helping me?

Best regards,
Etienne

Hi,

Try This :Grid extents alignment based on crop region - #6 by c.poupin

Durmus

Hi @Durmus_Cesur ,

Thank you! That dynamo is much easier to understand! (I never found this thread on dynamobim.com during my researches… that’s odd…)

It seems to work well on some Floor Plan views, but not on all of them. For example, I get the same error as above when I try to run it on the “Level 2” view of the architectural sample project of Revit (RAC_basic_sample_project.rvt). The script works well on the “Level 1”, though…

I don’t understand why. Do you have an idea?

Etienne

Hi,

I think a solution like that would do the trick.

Extents_Grids.dyn (116.3 KB)

Hi,

Thank you, but some nodes are red (node definition not loaded), even if I install the required packages (archi-lab.net and spring nodes). Are those custom nodes that are not in packages?

I really would like to understand why the “Exception: The curve is unbound or not coincident with the original one of the datum plane.” appears with the dynamo you sent me last time though… I tried to preview all the “created” lines and the grids in Dynamo, and I don’t see any difference between a view where the script works well and another… Do you have an idea?

Regards,

Etienne

Hi,

Yes, these are the nodes that belong to my individual package, and I’m sorry to share them directly with you without thinking about them. I’m sending you the missing code and a demo.
Create_Grids.dyf (20.4 KB)



Durmus

Hi,

Thank you. I’m sorry, but the node CategoryOfName is still missing…

“Walls” > “Categories” > “All element of Categorie” you can use the node.

Thank you again for your help!

I managed to make it work with some tweaks, but :

  • the recreated grids are not all at the right size
  • the bubbles are not always on the same side, and not always visible
  • after multiple executions, some grids are duplicated (sometimes with different names)

The “all python script” that you sent first worked better, but not on all views…
It’s quiet a tricky problem…

See images and script for more details.

Extents_Grids.dyn (127.2 KB)