Revit - Changing the location of views on a sheet

Hello,

I have a few sample sheets created, each with a single view assigned to them. I have successfully used View.ViewPortBoxCenter (from SteamNodes) to grab the location of all the viewprots on my collection of sheets. What I am struggling with his manipulating those locations. I’ve tried a few different approaches including the obvious - plugging in Point.ByCoordinates. I have also tried this on a single viewport with no success.

I feel like it is something relatively simple that I am missing. If anyone can see what I am doing wrong, or has another suggestion for going about this that would be greatly appretiated!

Viewport SetBox Center

Hello Patrick,

Those nodes were meant for a different work-flow - assembly view synchronization. However, you can definitely adapt them for what you need with a bit of python. Those nodes work with Revit XYZ coordinates. To use XYZs in Dynamo, you’ll need to first convert them to points and then, once you’re done editing them, convert them back to XYZs.

XYZ -> Point:

2015-09-22_23-45-44

Example work-flow:

Point -> XYZ:

2015-09-22_23-46-36

Good luck!

Dimitar,

Once again you’ve helped me immensely. Thank you very much. I guess it’s time for me to start trying to learn python. It seems like it could make life a lot easier with just a little bit of code.

Hi guys.

I’m still learning here, so please forgive the n00b question.

I’ve duplicated your graph, abut when I run it, nothing seems to happen.

I created a new project with only one Viewport on a Sheet.

When I run the graph, I get two blue dots on my screen, but nothing else happens.

I’d upload the graph, but it’s really identical to Ditmar’s Example work-flow image except for a bunch of Watch nodes.

Am I missing something? Does the Viewport.SetBoxCenter node act immediately, or does it need something after to activate it?

(I’ve tried both Automatic and Manual)

Also, what units are returned/passed to the Viewport. nodes? The numbers I’m getting seem to be related to the scale of the box. When I measure the distance between those points, I get 6.25" , which is 1/8 of 50.

Thanks!SetViewport

I’m not exactly sure what I did, but I’ve got at least one Viewport to move!

It appears that the units might be in feet, not inches, so I can live with that.

Now if I can just get several to move at the same time…

Thanks for the examples, guys!

@Dimitar_Venkov
I’ve tried using your above method but I am getting an error on the Point.Add node “warning: dereferencing a non pointer”.
I’m new to dynamo and I know nothing about python scripts, so any advice would be really appreciated.

My views were set up using the below but the location of the view on the sheet is not centered.

Dimitar,

I’m really interested in this workflow, but the graph is very small and I can’t see what you have done. Is there any chance you could forward the DYN please?

Many thanks

Hi James,

Unfortunately, I don’t have a copy of that graph any more. The images are too tiny because they were imported from the old Dynamo forum. The old forum is not hosted any longer and the links to it are dead.

However, all of the nodes in that workflow should be a part of the Steam Nodes package. @Julien_Benoit1 might be able to provide an updated version of that graph.

Not really. Your excellent contributions from your prolific days are still accessible, it seems :slight_smile:
http://dynamobim.com/forums/topic/revit-changing-the-location-of-views-on-a-sheet/

Googling the topic name tends to throw up a link to the original page

PS: Tool the liberty of editing your post above with images from the original post

2 Likes

Thanks for this Gents

1 Like

Genius as always @Vikram_Subbaiah!

2 Likes