Revit API 2015 Python: GetAllViewports() takes exactly 1 argument (0 given)

143 views Asked by At
    data = UnwrapElement(IN[0])
    outlist = []
    for i in data:
        vs = ViewSheet.GetAllViewports()
        outlist.append(vs)
    OUT = vs

This kind of problem:

Revit API 2015 Python: GetAllViewports() takes exactly 1 argument (0 given)

What arg do I need to place in GetAllViewports()?

1

There are 1 answers

0
Daren Thomas On

The error "... takes exactly 1 argument (0 given)" is often a hint that you are calling an unbound instance method: Instead, get hold of the ViewSheet you are interested in and call the GetAllViewports method from there, as opposed to using the method on the class name (ViewSheet).