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
does this collect all reference callouts for one detail?
what category are you selecting in english? Im in revit 2021
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…
vanman
May 11, 2022, 8:10am
10
Can getreferencecallouts be design script?
vanman
May 11, 2022, 8:31am
11
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
vanman
May 11, 2022, 9:08am
14
thanks you! but it seems to give emptys
I think this is what you need:
vanman
May 11, 2022, 9:24am
16
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
vanman
May 11, 2022, 9:29am
17
That getreferencecallouts method, can you do it to get the element Id then I can select it through that?
vanman
May 11, 2022, 9:52am
18
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
vanman:
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
Check, there are here some spelling mistakes
1 Like
vanman
May 11, 2022, 9:58am
21
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
1 Like