Is possible to set the view range of view templates using schedule or similar?

Is possible to set the view range of view templates using schedule or similar?

i want to edit the top of the view range by unlimited for example, and in other cases leave it as level above with value -0.3 for example
image

Possible using revit API or Genius Loci package. Thread here showing how in its solution:

1 Like

I mean modify the view template not the other views, if using view template the view range can be locked and not editable

This is a method of the view/viewplan class, which crosses over with view templates in the Revit API view class.Try sending through a view template and see what happens…

After getting to a computer and testing it looks like they do indeed return view ranges:

# Made by Gavin Crump
# Free for use
# BIM Guru, www.bimguru.com.au

# Boilerplate text
import clr

clr.AddReference("RevitAPI")
import Autodesk 
from Autodesk.Revit.DB import *

# Define list/unwrap list functions
def uwlist(input):
    result = input if isinstance(input, list) else [input]
    return UnwrapElement(result)

# Preparing input from dynamo to revit
uw_list  = uwlist(IN[0])

view_ranges = []

for v in uw_list:
	try:
		vr = v.GetViewRange()
		view_ranges.append(vr)
	except:
		view_ranges.append(None)

# Preparing output to Dynamo
OUT = view_ranges

You’ll find what you need in Genius Loci for get/set, but the API class you can use more specifically is here: PlanViewRange Class

1 Like

you mean it works with a view template because is also a view? if that is the case cool! I will try. I just want to edit the view range by each view using schedule but it does not exist in revit schedule so I need the dynamo wizard