LightFamily.SetLightDistributionStyle
Description:
Set the light distribution style to the given shape distribution
Set the light distribution style to the given shape distribution
public void SetLightDistributionStyle(
LightDistributionStyle lightDistributionStyle
)
-
lightDistributionStyleThe light distribution style to set the light distribution type to
public void ModifyLightDistributionStyle(Document familyDoc)
{
// Get the light family from the static method.
LightFamily lightFamily = LightFamily.GetLightFamily(familyDoc);
// Set the light distribution style to PhotometricWeb
lightFamily.SetLightDistributionStyle(LightDistributionStyle.PhotometricWeb);
// After light shape style set to PhotometricWeb, each tyoe returns a CircleLightShape instance,
for (int index = 0; index < lightFamily.GetNumberOfLightTypes(); index++)
{
LightType lightData = lightFamily.GetLightType(index);
PhotometricWebLightDistribution lightDistribution =
lightData.GetLightDistribution() as PhotometricWebLightDistribution;
lightDistribution.PhotometricWebFile = @"C:\IES\1x4 2Lamp.ies"; // input a full file path here.
lightDistribution.TiltAngle = Math.PI / 6; // use radian value to set
lightData.SetLightDistribution(lightDistribution); // set back
}
}
-
A value passed for an enumeration argument is not a member of that enumeration