Need to create callouts with Python Script

There is no ViewCallout class in the Revit API, that’s why you get that warning.

You can see how archi-lab creates a callout, it’s open source, it’s on line 308 in Views.cs: archilab/Views.cs at c491616c674d46cb254bd2a68184a34b4148a802 · ksobon/archilab · GitHub

It’s not hard to translate from C# to python, a lot of things are really similar.

So you should use something like this:

# Create the callout view
calloutView = ViewSection.CreateCallout(doc, view.Id, calloutViewFamilyType.Id, pt1, pt2);

(I haven’t tested this, you also need two points, so it’s not just a simple replacement.)

API docs for this method can be found here: CreateCallout Method

1 Like