Modifying Space type Lighting, Power schedules using Dynamo

Hi all,

Since I found help previous time with some quite similar problem, I will try my luck this time. I was searching for problem solution everywhere, but didn’t found an answer. So now my goal is to create custom Lighting, Power and Occupancy Schedules in Space Type Parameters.

It can be done manually by changing the time and factor values, but I am looking for some more automatized way. Is there any solution how the information from external source (excel for example) can be linked to a new custom schedule using Dynamo or Python?
I have a measured data of lighting and power usage from the building and would like to link it to the mentioned parameter.
Is it related to BuiltInParameter which I found in Revit Api docs?

Any thought is appreciated!
Thanks!

Hello
here an example

import clr
import sys
import System
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *
#import specify namespace
from Autodesk.Revit.DB.Mechanical import *

clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

spaceTypeNam = IN[0]
load_Schedul = UnwrapElement(IN[1])
out = []

TransactionManager.Instance.EnsureInTransaction(doc)
hvacType = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_HVAC_Load_Space_Types).ToElements()
for bc in hvacType:
	if bc.Name == spaceTypeNam:
		paraSchLight = bc.get_Parameter(BuiltInParameter.SPACE_LIGHTING_SCHEDULE_PARAM)
		paraSchLight.Set(load_Schedul.Id)
		out.append(bc)
		break
TransactionManager.Instance.TransactionTaskDone()
OUT =  out

Thanks!

But as I understand these codes is a midway, is it possible to create new Schedule from the information like presented below? And then new schedule can be selected with the code you proposed.

Unless recently modified, HVAC loads schedules creation is not supported by the Revit API.