LightType.GetLightTypeFromInstance Method

LightTypeGetLightTypeFromInstance Method

Creates a light type object from the given document and element ID

Namespace: Autodesk.Revit.DB.Lighting
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public static LightType GetLightTypeFromInstance(
	Document document,
	ElementId instanceId
)
Public Shared Function GetLightTypeFromInstance ( 
	document As Document,
	instanceId As ElementId
) As LightType
public:
static LightType^ GetLightTypeFromInstance(
	Document^ document, 
	ElementId^ instanceId
)
static member GetLightTypeFromInstance : 
        document : Document * 
        instanceId : ElementId -> LightType 

Parameters

document  Document
The document the instanceId is from
instanceId  ElementId
The ID of the light fixture instance

Return Value

LightType
The newly created LightType object
Exceptions
ExceptionCondition
ArgumentException The ElementId is the argument that is being validated The ElementId is not valid because it is not for a light element.
ArgumentNullException A non-optional argument was null
See Also