Generic Annotation Placement for a Family Showing Incorrectly in RCP?

Hi there, brand new and completely incompetent when it comes to Dynamo, so figured I would ask the experts first. How would I build a script that helps with the following?

I have a sprinkler family that is required to be shown correctly rotated in section, though it does not have a rotation parameter attached to it. In plan, it shows up incorrectly because of this rotation, so I would like to cover it with its generic annotation symbol. Is there a way for Dynamo to read the centerpoints of where the family lands in plan and place the symbol over the top of it? There are over 300 of these in the model, so would be great if this is an option.

It is not an option to show them in normal orientation due to the section views that are required for the drawing set.



Why don’t you add that information to the family itself?


It is part of the family, it’s just that it doesn’t show because the sprinkler fixture itself isn’t perpendicular/normal to the plan. It’s rotated, so it shows in plan as a 3D cylinder that’s rotated, and that makes it illegible.

This means I need to manually add it over the top of the family as a symbol to show it correctly.

Since I suggested the solution that won’t work, in the first place, I feel like I should provide an answer here, now that you proved that my suggestion is not valid. Here it is.

If we got some families, and you know their type ie. Dining Chair (3):

We can select all instances of that chair, obtain its location point and then place an annotation like so:

Here’s the python code:

# Copyright(c) 2019, Konrad K Sobon
# @arch_laboratory,

import clr
import Autodesk.DesignScript.Geometry

import Revit

import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument

from Autodesk.Revit.DB import *

import System
from System import Array
from System.Collections.Generic import *

import sys
pyt_path = r'C:\Program Files (x86)\IronPython 2.7\Lib'

def process_list(_func, _list):
    return map(lambda x: process_list(_func, x) if type(x) == list else _func(x), _list)

fType = UnwrapElement(IN[0])

def place_annotation(loc):
	return doc.Create.NewFamilyInstance(loc.ToXyz(), fType, doc.ActiveView)

    errorReport = None
    output = process_list(place_annotation, IN[1])
    import traceback
    errorReport = traceback.format_exc()

if None == errorReport:
    OUT = output
    OUT = errorReport

Here’s the result:

Please see attached for the script: familylocationtoannotation.dyn (10.6 KB)


@Konrad_K_Sobon – wow, exactly this! Amazing help, thank you so much :smiley:

Nailed it!