Automatically select Project Base Point

I wrote a dynamo script to automatically rotate the true-north arrow. I can’t upload the dyn-file, so see below the screenshot.
I can manually select the Project Base Point and then manually select the North-arrow family to adjust the “angle to True North”. so far so good. but how do I have it automatically select the Project Base Point and also automatically select that north-arrow family?

I played a bit with “Element Types” and “All elements of Category” nodes to select the base point, but can’t get it to work. what I want is to open a Revit project, run the script and all north arrows will automatically be correct without having to manually select base point and north arrow family.

I just started with Dynamo yesterday, so there sure is something I’m missing.

Edit: I found a “Coordinates.ProjectRotation” node that seems to get the rotation parameter. A problem with that is, it doesn’t update the value when I rotate true north in Revit. It “updates” when I place the node again. See below, the node in the code stays at 305°, while the newly placed node shows the new correct value of 315°:

Hi @enkus,

Annoying that it doesn’t update itself automatically. But it might work if you just open the model and run the script.

Another approach to this is the following (This will update):
Use an Element Types node with All Elements of Type. set the Element Type to BasePoint. This will give you all the basepoints in Revit always in the same order → Survey Point, Project Basepoint… etc

Next you can use the LIst.GetItemAtIndex node with index 1 (Position of the Project Basepoint) and from there you can use Element.GetParameterByName to get the rotation to true north. This will update everytime you change is.

Jolemick: thanks a lot! I think I got it. Below my code. I also figured out how to automatically select the north-arrow family. i couldn’t have figured out your code on my own, but it works and updates when I rotate the true North (not that I rotate north all the time :-))

One minor issue I have is with my arrow family when i have a view that is turned 90° clockwise or counterclockwise on a sheet. when I place my arrow family before turning the view, it also will turn and point in the right direction (i.e. the project north will be turned to left or right). But when I place it after the view is turned, it will point “up”. Not the hugest deal since I just need to place the arrow before placing the view.

How would one know to use index 1 and not 0? When looking at the Element.Parameters (a very useful node!) both 0 and 1 are called the same. 0 doesn’t work, BTW.

Some dynamo issues that came up:

  • On the nodes i like to “pin” the content so i see what the node did (like the 335° it read in the picture below). but when I re-open the dyn-file, those blocks are un-pinned. Can the pinning be made permanent?
  • I tested this on multiple Revit projects that are open at the same time. But the dynamo script only uses the one that was open when I opened the dynamo script. When is witch tot he other Revit project, dynamo says “dynamo is not pointing to the current document”. but there doesn’t seem to be an option to point dynamo to the current Revit file. Only solution seems to close and reopen the dynamo file.

1 Like

Just as an FYI, this is actually normal behavior. To save memory, Dynamo only reruns nodes with new inputs. If a node’s inputs haven’t changed since the last run, Dynamo will not reevaluate the node. This limits the number of calculations done when rerunning a script and keeps things quick. For this reason, nodes without inputs tend not to update until replaced. This is why you see a lot of custom nodes with a boolean “Refresh” input. It allows you to manually change the inputs and force the node to rerun.

Hi Enkus,


That is why there is a forum!

I see a few questions here:
How can you make sure the North Arrow is placed normally even though a view is rotated?
That is an easy one. You can use the FamilyInstance.SetRotation and give a Rotation of 0. What this does is rotate any Family Instance “North”. After you can rotate the family with your family parameter.

How would one know to use index 1 and not 0?
In this occassion 0 is always the Surveypoint and 1 is always the Project Basepoint. You can write something to filter on their category, but that is not neccessary.

How can I pin an output?
Use a Watch Node. This displays the output of an node. If you use the Dynamo Player, you can right click the node and mark it is “As Output”.

My Code only works on my current project
Yes, Dynamo automatically works on the current project. It is possible to work on multiple projects, but that is quite advanced and you probably need Python for that. For now, Check out the Dynamo player, maybe you can Run by switching between projects.

thanks for clarifying Joelmick and Nick_Boyts! I definitely understand Dynamo better now.

Edit: I got promoted to be able to upload files. Attached the DYN file and the north arrow family
North Arrow.dyn (20.4 KB)

1 Like

Thanks Enkus,

This script looks truly amazing.

My north point family is embedded within the titleblock with a shared parameter to adjust the rotation on all sheets. As such there is no option to select the north point in the “family types” node. Can anyone suggest a workaround for this?

Any assistance to a dynamo newbie would be greatly appreciated

I just moved my North point to the title block since i couldn’t figure out how to move it on all floor and ceiling views automatically. My Autodesk thread for that is here.

Do the following in Revit:

  • make North arrow annotation family “shared” Edit: not needed
  • add the “Angle to True North” parameter to the title sheet family and tie them to the North arrow family

this won’t do anything since Dynamo doesn’t “see” the Arrow family embedded in the title sheet family.

Do this in dynamo:
Change the Family type to the Title sheet family

My problem is, my title sheet has 2 types. One for the Cover sheet (that includes a large name of the project), one for all the actual plan sheets. I only can select one.

Is there a way in Dynamo to connect two family types to the Element.SetParameterByName ?

See my new code. the red line is what i tried to connect both family types, which doesn’t work. i can work around and don’t show the arrow on the cover sheet, though. But would be cool to find out how to do it.

Edit: you don’t need to make the North Arrow family “shared”