Set Parameter of newly created views

I’ve written a script in the Rhino python editor to create views in Revit. The views are created just fine when that is the only action being preformed, but when I add the .get_Parameter line in to set the name of the view, the script fails. The views are not created, no warnings are given and nothing really happens.

Other attribute calls like .Name, .Parameters, etc work, but it fails with get_Parameter.

import clr
from System import Action, Func
from System.Linq import Enumerable
from Autodesk.Revit.DB import *
from RhinoInside.Revit import Revit, Convert

revdoc = Revit.ActiveDBDocument

def CommitToDocument(doc):
    viewfamcollector = FilteredElementCollector(revdoc).OfClass(ViewFamilyType).WhereElementIsElementType().ToElements()
    for v in viewfamcollector:
        viewname = v.get_Parameter(BuiltInParameter.ALL_MODEL_TYPE_NAME).AsString()
        if viewname == '3D View':
            viewfam = v
    if viewfam:
        id = viewfam.Id
        for n in names:
            newview = View3D.CreatePerspective(revdoc, id)
            newview.get_Parameter(BuiltInParameter.VIEW_NAME).Set(n) #This is where it fails

names = ['Test01', 'Test02']



I was able to get it to work with LookupParameter, but still unsure why get_Parameter wasn’t working.