I feel i’m close to create callouts using python script, but i don’t know what is the problem of this code if somebody can help.
And i know that Archi-lab is having a ready node which does the same, but i need to get this function with a python script
thanks in advance
import clr
clr.AddReference('RevitAPI')
clr.AddReference('RevitServices')
from Autodesk.Revit.DB import *
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
calloutType = IN[0]
calloutViewFamilyType = IN[1]
view = IN[2]
TransactionManager.Instance.EnsureInTransaction(doc)
# Create the callout view
calloutView = ViewCallout.Create(doc, calloutType.Id, calloutViewFamilyType.Id, view.Id, XYZ(0, 0, 0))
TransactionManager.Instance.TransactionTaskDone()
OUT = calloutView
but it gives this error