Set "Luminous Flux" parameter value from .rfa document file

Hi there!
i’m trying to set different values to some photometric parameters such as “Luminous Flux” or “Initial Intensity” inside family environment (I’m building lighting fixtures families) and I fail every time and i’ve been trying for days. When i get those values, them appear to be “0” and the parameter type of those show as “Invalid”

Can someone put some light into this dark spot where i’m in?

Thank you all!

@Xavier.Roque4KG4T ,

it tried python but also no success :confused:

# Phython-Standard- und DesignScript-Bibliotheken laden
import sys
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *

def Element(x):
	return UnwrapElement(x).get_Parameter(BuiltInParameter.FBX_LIGHT_INITIAL_INTENSITY).AsInteger()

OUT = []

for i in IN[0]:
	OUT.append(Element(i))

when i switch to AsString i get “Null” – i don`t know which datatype it is?

Thank you! I wish I knew python…

This helps?


Tanks you![quote=“Draxl_Andreas, post:2, topic:81929, full:true”]
@Xavier.Roque4KG4T ,

it tried python but also no success :confused:

# Phython-Standard- und DesignScript-Bibliotheken laden
import sys
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *

def Element(x):
	return UnwrapElement(x).get_Parameter(BuiltInParameter.FBX_LIGHT_INITIAL_INTENSITY).AsInteger()

OUT = []

for i in IN[0]:
	OUT.append(Element(i))

when i switch to AsString i get “Null” – i don`t know which datatype it is?
[/quote]

@Xavier.Roque4KG4T ,

no i also stuck in getting the right solution… …someone has to do the “rebound” :wink: When the Parameter is exposed to the Revit API - there is hope

I believe you have to go through the API to get anything inside those parameters (and any other parameter that includes a flyout for multiple values).

This post has more info and a few examples. You can also search for the top level parameters in the API Docs and see that some of them have properties for the other values.

2 Likes

@Nick_Boyts @Xavier.Roque4KG4T ,

i tested it but it is still “Null”

# Phython-Standard- und DesignScript-Bibliotheken laden
import sys
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *

def Element(x):
	return UnwrapElement(x).get_Parameter(BuiltInParameter.FBX_LIGHT_LIMUNOUS_FLUX).AsInteger()

OUT = []

for i in IN[0]:
	OUT.append(Element(i))

which data typ do i need? AsString and AsInteger does not work

You may have to go through the other classes (selectable parameters) in order to get those values. Even though they’re built-in parameters, they’re properties of the class, not parameters of the element. Look at the API Docs link I posted for an example.

You’re right! I’m a complete noob. :hatching_chick:

Thanks for your time and effort!


Any suggestions on this error?

Thanks!


also this… i’m not very sure how to proceed.

SASSO 60 base ceiling round adjustable 2 lamps LS.rfa (400 KB)

Here it is. :slight_smile:

Wow. I’ts a shame that they are not doing anything about that “bug”… anyway, i’m glad to know at least that it’s not possible to do that and i’m no longer stamping onto the wall.

Thank you for your time guys! :slight_smile: