Collect callouts

Hi, I’m trying to collect all reference callouts of a detail view to get the data of which sheet number all the references are. Is there a node for this? or is there a way to collect all the callouts to work from there? I would need to get all reference callouts from a linked model too

Not sure how to code GetReferenceCallouts Method

1 Like


hi @vanman ,

i did it this way.

KR

Andreas

1 Like

does this collect all reference callouts for one detail?

@vanman
so i have it!

1 Like

what category are you selecting in english? Im in revit 2021
image
image

I’m trying to collect the referencing callouts to get the highlighted information


in my case i did not place them on sheets but i get the information

I dont know why but my view reference category is returning nothing…

Can getreferencecallouts be design script?

Can anyone give me a hand with the python?

#Alban de Chasteigner 2018
#twitter : @geniusloci_bim
#geniusloci.bim@gmail.com

import clr
# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
# Import RevitAPI
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *

# Import ToDSType(bool) extension method
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)

view = UnwrapElement(IN[0])

viewref = view.GetReferenceCallouts()

OUT = viewref

@vanman

Try this:

#Alban de Chasteigner 2018
#twitter : @geniusloci_bim
#geniusloci.bim@gmail.com

import clr
# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
# Import RevitAPI
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *

# Import ToDSType(bool) extension method
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)

view = UnwrapElement(IN[0])

viewrefs = []
for i in view:
	viewref = i.GetReferenceCallouts()
	viewrefs.append(viewref)

OUT = viewrefs
1 Like

thanks you! but it seems to give emptys

I think this is what you need:

When I add or delete referenced call outs. The all elements of category for views list dosnt change so its not picking them up. I think I have to try collect the callouts as a family or element somehow because if I pick it I can get these parameters I need
image

That getreferencecallouts method, can you do it to get the element Id then I can select it through that?

found this in a form. Had to type it out from a pic. Cant get it to work but maybe it could be of help to get a views callout element

#Alban de Chasteigner 2018
#twitter : @geniusloci_bim
#geniusloci.bim@gmail.com

import clr
# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
# Import RevitAPI
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *

# Import ToDSType(bool) extension method
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)

collectorViewer = FilteredElementCollector(doc)
OSTviewers = collectorViewer.OfCategory
(BuiltInCategory.OST_Viewers).ToElements()

def GetAllCallouts(_doc, _OSTviewers):
	CalloutParaent = []
	for view in _OSTviewers:
		paraIndex = BuiltInParameter.SECTION_PARENT_VIEW_NAME
		parameter = view.get_Parameter(paraIndex)
		if parameter != None:
			element = _doc.GetElement(view.get_Parameter
			(paraIndex).AsElementId())
			if element!= None:
				CalloutParaent.append(view)
			
	return CalloutParent
OUT = GetAllCallouts(doc,OSTviewers)

That code works fine :

#Alban de Chasteigner 2018
#twitter : @geniusloci_bim
#geniusloci.bim@gmail.com

import clr
# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
# Import RevitAPI
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *

# Import ToDSType(bool) extension method
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)

collectorViewer = FilteredElementCollector(doc)
OSTviewers = collectorViewer.OfCategory(BuiltInCategory.OST_Viewers).ToElements()

def GetAllCallouts(_doc, _OSTviewers):
	CalloutParent = []
	for view in _OSTviewers:
		paraIndex = BuiltInParameter.SECTION_PARENT_VIEW_NAME
		parameter = view.get_Parameter(paraIndex)
		if parameter != None:
			element = _doc.GetElement(view.get_Parameter
			(paraIndex).AsElementId())
			if element!= None:
				CalloutParent.append(view)
			
	return CalloutParent
	
OUT = GetAllCallouts(doc,OSTviewers)

1 Like

Check, there are here some spelling mistakes

1 Like

it does to… Had to close and open dynamo again or it was from using what you posted with fixed errors thanks. Would be much easier to get the reference callouts from a view. I’ve also got to figure out how to get referenced callouts from a linked file :crazy_face:

1 Like

Goodluck :slight_smile: