<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: FBX_LIGHT_PHOTOMETRIC_FILE, absolute IES path issue in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/fbx-light-photometric-file-absolute-ies-path-issue/m-p/9523501#M60293</link>
    <description>&lt;P&gt;Thank you for you update.&lt;/P&gt;&lt;P&gt;Unfourtunately, your suggestion corresponds to what I'm already doing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This way, in the "Photometric Web File" parameter is written the whole path of the folder from which the plugin uploads the .ies file itself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is exactly what I want to avoid, because this way the .ies file is referenced externally and whenever I move it from its original location (or if I send the .rfa file to another person), the .ies file is no more readable inside the .rfa file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want to obtain is to reproduce exactly with the plugin the manual uploading of a .ies file inside the "Photometric Web File" parameter, which is: you do not see the complete path anymore, but only the name of the .ies file, which is this way "loaded" inside the .rfa file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have further suggestions on this topic, please let me know.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;Bye&lt;/P&gt;</description>
    <pubDate>Mon, 18 May 2020 11:33:34 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-05-18T11:33:34Z</dc:date>
    <item>
      <title>FBX_LIGHT_PHOTOMETRIC_FILE, absolute IES path issue</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/fbx-light-photometric-file-absolute-ies-path-issue/m-p/6869026#M60285</link>
      <description>&lt;P&gt;Hi Jeremy,&lt;BR /&gt;&lt;BR /&gt;I've faced a very different behavior when setting the "Photometric File"/BuiltInParameter.FBX_LIGHT_PHOTOMETRIC_FILE parameter via API or GUI.&lt;BR /&gt;&lt;BR /&gt;When setting it via GUI, I use to set the file path to an *ies file.&lt;BR /&gt;&lt;BR /&gt;The data of the ies file is stored in another parameter, BuiltInParameter.FBX_LIGHT_PHOTOMETRIC_FILE_CACHE, as you have already documented:&lt;BR /&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2016/01/loading-an-ies-photometric-web-and-exciting-times.html" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2016/01/loading-an-ies-photometric-web-and-exciting-times.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;In the blog posting, it is mentioned that setting the parameter will update the buffer parameter.&lt;BR /&gt;&lt;BR /&gt;I myself don't use a FamilySymbol's parameter but the built-in *FamilyParameter*, but that should not make a difference.&lt;BR /&gt;Also, the behavior is the same in Revit 2015 and 2017.&lt;BR /&gt;&lt;BR /&gt;When setting the parameter via API, the result is completely different.&lt;BR /&gt;I set the parameter using the full ies file path.&lt;BR /&gt;This value is also displayed when opening the family manually.&lt;BR /&gt;&lt;BR /&gt;The problem is when the family is ported from one computer to another one.&lt;BR /&gt;I deliver the family but not the ies file.&lt;BR /&gt;In this case the stored (absolute) file path does not point to a valid ies file on the customer's computer.&lt;BR /&gt;&lt;BR /&gt;The then visible ies data, that means the light source geometry made of the ies data stored in the family, differs from the original ies file's content.&lt;BR /&gt;Seems that it is reset to a former state.&lt;BR /&gt;&lt;BR /&gt;Also, the family cannot be opened again if the ies file defined in the parameter does not exist.&lt;BR /&gt;&lt;BR /&gt;That's a bug.&lt;BR /&gt;&lt;BR /&gt;To work around this, I use Journal files to set the IES Parameter since it simulates the manual user input.&lt;BR /&gt;&lt;BR /&gt;Since I need to set the&amp;nbsp; parameter with several thousand Families, this is not an acceptable solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way, what is that, Autodesk?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Autodesk joke.png" style="width: 352px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/321441i9B9B049740CDF3A3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Autodesk joke.png" alt="Autodesk joke.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Revitalizer&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2017 14:31:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/fbx-light-photometric-file-absolute-ies-path-issue/m-p/6869026#M60285</guid>
      <dc:creator>Revitalizer</dc:creator>
      <dc:date>2017-02-10T14:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: FBX_LIGHT_PHOTOMETRIC_FILE, absolute IES path issue</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/fbx-light-photometric-file-absolute-ies-path-issue/m-p/8134859#M60286</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Dear Revitalizer,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for your query and sorry you have not received any answer yet to this.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Is this still an issue for you?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Have you made any progress on implementing a workaround?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I just saw that a new ADN case was raised that refers to this thread: &lt;STRONG&gt;&lt;U&gt;14390212&lt;/U&gt;&lt;/STRONG&gt; [IES-File und Revit Familien], raised by Contelos GmbH.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Do you know that company?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards from Brassac in Occitanie,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Jeremy&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jul 2018 10:19:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/fbx-light-photometric-file-absolute-ies-path-issue/m-p/8134859#M60286</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-07-17T10:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: FBX_LIGHT_PHOTOMETRIC_FILE, absolute IES path issue</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/fbx-light-photometric-file-absolute-ies-path-issue/m-p/8134911#M60287</link>
      <description>&lt;P&gt;Hi Jeremy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the issue is solved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All I needed was to search for "*IES*" in the RevitAPI.chm.&lt;/P&gt;&lt;P&gt;The IES parameter must be set in an indirect way.&lt;/P&gt;&lt;P&gt;In the LightFamily.SetLightDistributionStyle page, there is a code sample:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;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 &amp;lt; 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
    }
}&lt;/PRE&gt;&lt;P&gt;So, in fact, it was a self-RTFM.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By the way, I don't know why the BuiltInParameter can be set, it should be &lt;EM&gt;readonly&lt;/EM&gt; if setting it does not reflect UI behavior.&lt;/P&gt;&lt;P&gt;Currently, it is misleading.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Happy holidays,&lt;/P&gt;&lt;P&gt;Rudi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jul 2018 10:54:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/fbx-light-photometric-file-absolute-ies-path-issue/m-p/8134911#M60287</guid>
      <dc:creator>Revitalizer</dc:creator>
      <dc:date>2018-07-17T10:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: FBX_LIGHT_PHOTOMETRIC_FILE, absolute IES path issue</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/fbx-light-photometric-file-absolute-ies-path-issue/m-p/9220163#M60288</link>
      <description>&lt;P&gt;Hi Revitalizer,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm currently struggling with the same issue that you managed to solve (ies file path instead of file name for "Photometric Web File" parameter).&lt;/P&gt;&lt;P&gt;I've tried to use the solution you posted, but unfortunately it is still not working for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my piece of code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;for (int index = 0; index &amp;lt; lightFamily.GetNumberOfLightTypes(); index++)
            {
                LightType lightData = lightFamily.GetLightType(index);
                string lightTypeName = lightFamily.GetLightTypeName(index);

                for (int k = 0; k &amp;lt; fileIesList.Count; k++)
                {
                    if (lightTypeName == typeName[k])
                    {
                        lightFamily.SetLightDistributionStyle(LightDistributionStyle.PhotometricWeb);
                        PhotometricWebLightDistribution lightDistribution = lightData.GetLightDistribution() as PhotometricWebLightDistribution;
                        lightDistribution.PhotometricWebFile = fileIesList[k];
                        //lightDistribution.TiltAngle = Math.PI / 6;    // use radian value to set
                        lightData.SetLightDistribution(lightDistribution);  // set back

                        InitialColor initColor = lightData.GetInitialColor();
                        CustomInitialColor customInitialColor = initColor as CustomInitialColor;
                        double colorTemperature = customInitialColor.Temperature;
                        customInitialColor.Temperature = Convert.ToDouble(initialColor[k]);
                        lightData.SetInitialColor(customInitialColor);

                        if (wattage[k] == 0)
                        {
                            wattage[k] = 1;
                        }

                        double efficacy = luminousFlux[k] / wattage[k];
                        lightData.SetInitialIntensity(new InitialWattageIntensity(efficacy, wattage[k]));
                        lightData.SetInitialIntensity(new InitialFluxIntensity(luminousFlux[k]));
                    }
                }
            }&lt;/PRE&gt;&lt;P&gt;PLEASE NOTE: in the code, the&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #666666; cursor: text; font-family: inherit; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.7142; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;fileIesList[k]&lt;/SPAN&gt; variable contains all the full paths of the .ies files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Comparing my code to your I cannot see any difference...&lt;/P&gt;&lt;P&gt;But still the behaviour in my case is not fixed; this is in short how it works:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the plugin as a whole creates multiple types, starting from a "template" .rfa which doesn't contain any type.&lt;/P&gt;&lt;P&gt;For any type created in the .rfa, the plugin loads one .ies file (located in a folder chosen by the user) and sets the values of some parameters (including Initial Color, Wattage, Efficacy, Luminous Flux, etc...).&lt;/P&gt;&lt;P&gt;The values of the parameters are read from the .ies file itself. Then the .rfa file is saved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;HERE COMES THE ISSUE: in the saved .rfa, only the last type (the last created with the "for" loop) has the correct file name in the Photometric Web File parameter; all the others, instead, still present the full path.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Furthermore, the values of the other parameters (mentioned above) are set correctly only for the types which have the full path in the "Photometric Web File" parameter. In the only type for which the file name is set correctly, instead, the other parameters are left to the default values (as set in the "template" .rfa).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In attachment, a couple of screenshots to show the issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me to understand what I did wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if you need more information from my side.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help will be greatly appreciated.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2019 11:40:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/fbx-light-photometric-file-absolute-ies-path-issue/m-p/9220163#M60288</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-26T11:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: FBX_LIGHT_PHOTOMETRIC_FILE, absolute IES path issue</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/fbx-light-photometric-file-absolute-ies-path-issue/m-p/9220179#M60289</link>
      <description>&lt;P&gt;It might help a lot if you clarify your data structures.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You inner loop looks rather suspicious to me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;  for (int k = 0; k &amp;lt; fileIesList.Count; k++)
  {
      if (lightTypeName == typeName[k]) ...&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where does the `typeName` array or list come from?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why do you loop through the entire list each time to find the desired name?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would suggest that you restructure your data to enable a more efficient search.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you need to search by type name, then implement a dictionary taking the type name as a key and returning the desired data object, e.g., Dictionary&amp;lt;string,string&amp;gt; mapping type name to file path or whatever it is you need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That will make your code much easier to read and much more efficient to boot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2019 12:08:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/fbx-light-photometric-file-absolute-ies-path-issue/m-p/9220179#M60289</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2019-12-26T12:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: FBX_LIGHT_PHOTOMETRIC_FILE, absolute IES path issue</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/fbx-light-photometric-file-absolute-ies-path-issue/m-p/9220608#M60290</link>
      <description>&lt;P&gt;Hi Jeremy,&lt;/P&gt;&lt;P&gt;Thanks for your suggestion; it would definitely improve the performance this way.&lt;/P&gt;&lt;P&gt;In any case, I don't think that it would affect the behaviour for what concerns the mentioned issue...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll try to clarify the data structure I used for the part of code you highlighted:&lt;/P&gt;&lt;P&gt;1. &lt;FONT color="#ff0000"&gt;&lt;U&gt;&lt;STRONG&gt;lightTypeName&lt;/STRONG&gt;&lt;/U&gt;&lt;/FONT&gt; is the list of all the types, which are created previously in the code;&lt;/P&gt;&lt;P&gt;2. &lt;FONT color="#ff0000"&gt;&lt;U&gt;&lt;STRONG&gt;typeName&lt;/STRONG&gt;&lt;/U&gt;&lt;/FONT&gt; is another list, previously created, which has the same number of elements of lightTypeName, and contains all the strings of the names of the types.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f5f5; color: #3e3e3e; font-family: Menlo,Monaco,Consolas,'Courier New',monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.7142; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;"&gt;if (lightTypeName == typeName[k]) …&lt;FONT face="&amp;quot;Artifakt&amp;quot;,Tahoma,Helvetica,Arial,sans-serif" color="#002000"&gt; statement you highlighted means that, when the statement is true, the plugin&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f5f5; color: #3e3e3e; font-family: Menlo,Monaco,Consolas,'Courier New',monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.7142; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;"&gt;&lt;FONT face="&amp;quot;Artifakt&amp;quot;,Tahoma,Helvetica,Arial,sans-serif" color="#002000"&gt;writes the full path in the PhotometricWebFile parameter. The full path is taken from a third list, named &lt;U&gt;&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;fileIesList&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;FONT color="#000000"&gt;, which contains&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f5f5; color: #3e3e3e; font-family: Menlo,Monaco,Consolas,'Courier New',monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.7142; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;"&gt;&lt;FONT face="&amp;quot;Artifakt&amp;quot;,Tahoma,Helvetica,Arial,sans-serif" color="#002000"&gt;&lt;FONT color="#000000"&gt;all the full paths of the .ies files and obviously has the same number of elements of the other 2 lists.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f5f5; color: #3e3e3e; font-family: Menlo,Monaco,Consolas,'Courier New',monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.7142; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;"&gt;&lt;FONT face="&amp;quot;Artifakt&amp;quot;,Tahoma,Helvetica,Arial,sans-serif" color="#002000"&gt;&lt;FONT color="#000000"&gt;In the specific case of the example I posted previously, the list values are the following:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f5f5; color: #3e3e3e; font-family: Menlo,Monaco,Consolas,'Courier New',monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.7142; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;"&gt;&lt;FONT face="&amp;quot;Artifakt&amp;quot;,Tahoma,Helvetica,Arial,sans-serif" color="#002000"&gt;&lt;FONT color="#000000"&gt;&lt;FONT color="#ff0000"&gt;&lt;U&gt;&lt;STRONG&gt;typeName&lt;/STRONG&gt;&lt;/U&gt;&lt;/FONT&gt; contains:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f5f5; color: #3e3e3e; font-family: Menlo,Monaco,Consolas,'Courier New',monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.7142; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;"&gt;&lt;FONT face="&amp;quot;Artifakt&amp;quot;,Tahoma,Helvetica,Arial,sans-serif" color="#002000"&gt;&lt;FONT color="#000000"&gt;&lt;FONT&gt;071451_BLIZ ROUND 40 40W 5000K 0÷10V&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f5f5; color: #3e3e3e; font-family: Menlo,Monaco,Consolas,'Courier New',monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.7142; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;"&gt;&lt;FONT face="&amp;quot;Artifakt&amp;quot;,Tahoma,Helvetica,Arial,sans-serif" color="#002000"&gt;&lt;FONT color="#000000"&gt;&lt;FONT&gt;079421_MAGICLICK ROUND 25 LED 26W 4000K&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f5f5; color: #3e3e3e; font-family: Menlo,Monaco,Consolas,'Courier New',monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.7142; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;"&gt;&lt;FONT face="&amp;quot;Artifakt&amp;quot;,Tahoma,Helvetica,Arial,sans-serif" color="#002000"&gt;&lt;FONT color="#000000"&gt;&lt;FONT&gt;079877_MIMIK 50 B TYPE II 39+39W 830 EM90' 0-10V / Main&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f5f5; color: #3e3e3e; font-family: Menlo,Monaco,Consolas,'Courier New',monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.7142; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;"&gt;&lt;FONT face="&amp;quot;Artifakt&amp;quot;,Tahoma,Helvetica,Arial,sans-serif" color="#002000"&gt;&lt;FONT color="#000000"&gt;&lt;FONT&gt;079877_MIMIK 50 B TYPE II 39+39W 830 EM90' 0-10V / Battery&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f5f5; color: #3e3e3e; font-family: Menlo,Monaco,Consolas,'Courier New',monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.7142; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;"&gt;&lt;FONT face="&amp;quot;Artifakt&amp;quot;,Tahoma,Helvetica,Arial,sans-serif" color="#002000"&gt;&lt;FONT color="#000000"&gt;&lt;FONT color="#ff0000"&gt;&lt;U&gt;&lt;STRONG&gt;fileIesList&lt;/STRONG&gt;&lt;/U&gt;&lt;/FONT&gt; contains:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f5f5; color: #3e3e3e; font-family: Menlo,Monaco,Consolas,'Courier New',monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.7142; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;"&gt;&lt;FONT face="&amp;quot;Artifakt&amp;quot;,Tahoma,Helvetica,Arial,sans-serif" color="#002000"&gt;&lt;FONT color="#000000"&gt;&lt;FONT&gt;C:\Plugin\PRODUCT\PIL_071451.IES&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f5f5; color: #3e3e3e; font-family: Menlo,Monaco,Consolas,'Courier New',monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.7142; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;"&gt;&lt;FONT face="&amp;quot;Artifakt&amp;quot;,Tahoma,Helvetica,Arial,sans-serif" color="#002000"&gt;&lt;FONT color="#000000"&gt;&lt;FONT&gt;C:\Plugin\PRODUCT\PIL_079421.IES&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f5f5; color: #3e3e3e; font-family: Menlo,Monaco,Consolas,'Courier New',monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.7142; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;"&gt;&lt;FONT face="&amp;quot;Artifakt&amp;quot;,Tahoma,Helvetica,Arial,sans-serif" color="#002000"&gt;&lt;FONT color="#000000"&gt;&lt;FONT&gt;C:\Plugin\PRODUCT\PIL_079877_MainsVoltage.IES&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f5f5; color: #3e3e3e; font-family: Menlo,Monaco,Consolas,'Courier New',monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.7142; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;"&gt;&lt;FONT face="&amp;quot;Artifakt&amp;quot;,Tahoma,Helvetica,Arial,sans-serif" color="#002000"&gt;&lt;FONT color="#000000"&gt;&lt;FONT&gt;C:\Plugin\PRODUCT\PIL_079877_OnBattery.IES&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f5f5; color: #3e3e3e; font-family: Menlo,Monaco,Consolas,'Courier New',monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.7142; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;"&gt;&lt;FONT face="&amp;quot;Artifakt&amp;quot;,Tahoma,Helvetica,Arial,sans-serif" color="#002000"&gt;&lt;FONT color="#000000"&gt;PLEASE NOTE: In the screenshot uploaded in the previous post, you can see only 2 types instead of 4 because the plugin split&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f5f5; color: #3e3e3e; font-family: Menlo,Monaco,Consolas,'Courier New',monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.7142; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;"&gt;&lt;FONT face="&amp;quot;Artifakt&amp;quot;,Tahoma,Helvetica,Arial,sans-serif" color="#002000"&gt;&lt;FONT color="#000000"&gt;the types between two distinct files, according to the different shape of the Emitting surface (circle and rectangle).&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f5f5; color: #3e3e3e; font-family: Menlo,Monaco,Consolas,'Courier New',monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.7142; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-break: break-all; word-spacing: 0px;"&gt;&lt;FONT face="&amp;quot;Artifakt&amp;quot;,Tahoma,Helvetica,Arial,sans-serif" color="#002000"&gt;&lt;FONT color="#000000"&gt;I'll copy below a bigger part of the code, I hope this can help you better understand the data structure.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;private void Create_rfa_files()
    {
        this.doc = application.OpenDocumentFile(get_rfa_template.rfaTemplateFile);
        //doc.Save();
        if (Get_family_types_in_family() &amp;gt; 0)
        {
            Reset_window();
            return;
        }

        folderName.Clear();
        shapeType.Clear();
        destinationFileList.Clear();

        foreach (DataGridViewRow item2 in (IEnumerable)this.dgv2.Rows)
        {
            folderName.Add(item2.Cells[0].Value.ToString());
            shapeType.Add(item2.Cells[2].Value.ToString());
        }

        Create_short_folder_list();

        this.int4 = int4 + 1;
        this.Progress_bar();

        for (int i = 0; i &amp;lt; shortFolderList.Count; i++)
        {
            this.int4 = int4 + 1;
            this.Progress_bar();

            this.doc = application.OpenDocumentFile(get_rfa_template.rfaTemplateFile);
            //doc.Save();

            //foreach (FileInfo fileInfo in new DirectoryInfo(get_rfa_template.rfaTemplatePath).GetFiles("*.00*.rfa"))
            //{
            //    fileInfo.Delete();
            //}

            Get_family_types_in_family();

            FamilyManager familyManager = this.doc.FamilyManager;
            FamilyTypeSet famTypes = familyManager.Types;

            Transaction transaction = new Transaction(doc);

            //Add_existing_family_param_names();

            transaction.Start("Add Type to Family");

            LightFamily lightFamily = LightFamily.GetLightFamily(doc);

            for (int j = 0; j &amp;lt; folderName.Count; j++)
            {
                this.int4 = int4 + 1;
                this.Progress_bar();

                if (shortFolderList[i] == folderName[j] &amp;amp;&amp;amp; shortShapeList[i] == shapeType[j])
                {
                    if (familyManager.CurrentType.Name != typeName[j])
                    {
                        familyManager.NewType(typeName[j]);

                        if (dgv2.Rows[j].Cells[2].Value.ToString() == "Circle")
                        {
                            lightFamily.SetLightShapeStyle(LightShapeStyle.Circle);

                            FamilyParameter familyParam = familyManager.get_Parameter("Emit from Circle Diameter");
                            familyManager.Set(familyParam, (circleDiameter[j] / _feet_to_mm) * (-1000));
                        }

                        if (dgv2.Rows[j].Cells[2].Value.ToString() == "Rectangle")
                        {
                            lightFamily.SetLightShapeStyle(LightShapeStyle.Rectangle);

                            FamilyParameter familyParam = familyManager.get_Parameter("Emit from Rectangle Length");
                            familyManager.Set(familyParam, (rectangleLength[j] / _feet_to_mm) * 1000);

                            familyParam = familyManager.get_Parameter("Emit from Rectangle Width");
                            familyManager.Set(familyParam, (rectangleWidth[j] / _feet_to_mm) * 1000);
                        }

                        {
                            FamilyParameter familyParam = familyManager.get_Parameter("Lamp");
                            familyManager.Set(familyParam, sourceType[j]);
                        }

                        {
                            FamilyParameter familyParam = familyManager.get_Parameter("Emit Shape Visible in Rendering");
                            if (Convert.ToBoolean(dgv2.Rows[j].Cells[3].Value))
                            {
                                familyManager.Set(familyParam, 1);
                            }
                            else
                            {
                                familyManager.Set(familyParam, 0);
                            }
                        }

                        {
                            //FamilyParameter familyParam = familyManager.get_Parameter("Photometric Web File");
                            //familyManager.Set(familyParam, fileIesList[j]);
                        }
                    }
                }
            }

            for (int index = 0; index &amp;lt; lightFamily.GetNumberOfLightTypes(); index++)
            {
                LightType lightData = lightFamily.GetLightType(index);
                string lightTypeName = lightFamily.GetLightTypeName(index);

                for (int k = 0; k &amp;lt; fileIesList.Count; k++)
                {
                    if (lightTypeName == typeName[k])
                    {
                        lightFamily.SetLightDistributionStyle(LightDistributionStyle.PhotometricWeb);
                        PhotometricWebLightDistribution lightDistribution = lightData.GetLightDistribution() as PhotometricWebLightDistribution;
                        lightDistribution.PhotometricWebFile = fileIesList[k];
                        //lightDistribution.TiltAngle = Math.PI / 6;    // use radian value to set
                        lightData.SetLightDistribution(lightDistribution);  // set back

                        InitialColor initColor = lightData.GetInitialColor();
                        CustomInitialColor customInitialColor = initColor as CustomInitialColor;
                        double colorTemperature = customInitialColor.Temperature;
                        customInitialColor.Temperature = Convert.ToDouble(initialColor[k]);
                        lightData.SetInitialColor(customInitialColor);

                        if (wattage[k] == 0)
                        {
                            wattage[k] = 1;
                        }

                        double efficacy = luminousFlux[k] / wattage[k];
                        lightData.SetInitialIntensity(new InitialWattageIntensity(efficacy, wattage[k]));
                        lightData.SetInitialIntensity(new InitialFluxIntensity(luminousFlux[k]));
                    }
                }
            }

            familyManager.Dispose();
            transaction.Commit();

            //ModifyLightDistributionStyle(doc,i);

            string fileName = "";
            if (shortShapeList[i] == "Circle")
            {
                fileName = shortFolderList[i] + "_Photometrics_C";
            }
            if (shortShapeList[i] == "Rectangle")
            {
                fileName = shortFolderList[i] + "_Photometrics_R";
            }

            string destinationFile = select_destination_folder.destinationFolderName + "\\N1_" + fileName + ".rfa";

            if (File.Exists(destinationFile))
            {
                File.Delete(destinationFile);
            }

            doc.SaveAs(destinationFile);
            destinationFileList.Add(destinationFile);

            if (transaction != null)
            {
                ((IDisposable)transaction).Dispose();
            }
        }&lt;/PRE&gt;&lt;P&gt;Hope this can clarify… If necessary I'll give further explanation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2019 18:07:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/fbx-light-photometric-file-absolute-ies-path-issue/m-p/9220608#M60290</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-26T18:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: FBX_LIGHT_PHOTOMETRIC_FILE, absolute IES path issue</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/fbx-light-photometric-file-absolute-ies-path-issue/m-p/9239566#M60291</link>
      <description>&lt;P&gt;Hi Jeremy,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see that trying to explain the complexity of my plugin as a whole is too difficult and time wasting both for me and for you…&lt;/P&gt;&lt;P&gt;So, I’ve simplified it the most I can. I’ve written a simple code in which there are no lists and variables but all the values to be set are explicit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here it is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;private void Create_rfa_files()
    {
        this.doc = application.OpenDocumentFile(@"C:\Users\bianc\Desktop\Template1.rfa");

        Transaction transaction = new Transaction(doc);
        transaction.Start("Set IES file");

        LightFamily lightFamily = LightFamily.GetLightFamily(doc);
        lightFamily.SetLightDistributionStyle(LightDistributionStyle.PhotometricWeb);

        for (int index = 0; index &amp;lt; lightFamily.GetNumberOfLightTypes(); index++)
        {
            LightType lightData = lightFamily.GetLightType(index);

            PhotometricWebLightDistribution lightDistribution = lightData.GetLightDistribution() as PhotometricWebLightDistribution;
            lightDistribution.PhotometricWebFile = @"C:\Users\bianc\Desktop\PIL_071451.IES";
            lightDistribution.TiltAngle = Math.PI / 2;    // use radian value to set
            lightData.SetLightDistribution(lightDistribution);  // set back

            InitialColor initColor = lightData.GetInitialColor();
            CustomInitialColor customInitialColor = initColor as CustomInitialColor;
            double colorTemperature = customInitialColor.Temperature;
            customInitialColor.Temperature = 2577;
            lightData.SetInitialColor(customInitialColor);

            double efficacy = 9387.55 / 123.33;
            lightData.SetInitialIntensity(new InitialWattageIntensity(efficacy, 123.33));
            lightData.SetInitialIntensity(new InitialFluxIntensity(9387.55));
        }

        transaction.Commit();

        string destinationFile = @"C:\Users\bianc\Desktop\familyTest.rfa";
        doc.SaveAs(destinationFile);
    }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see, the code takes one .rfa file as a starting point (&lt;STRONG&gt;Template1.rfa&lt;/STRONG&gt;).&lt;/P&gt;&lt;P&gt;The .rfa has already two types in it (see &lt;STRONG&gt;Template1.jpg&lt;/STRONG&gt; as a reference)&lt;/P&gt;&lt;P&gt;For every type, the “for” cycle writes the same values for &lt;STRONG&gt;Initial Intensity&lt;/STRONG&gt;, &lt;STRONG&gt;Initial Color,&lt;/STRONG&gt; &lt;STRONG&gt;Tilt Angle&lt;/STRONG&gt; and &lt;STRONG&gt;Photometric Web File&lt;/STRONG&gt; parameters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see in the two attached files named &lt;STRONG&gt;Type1.jpg&lt;/STRONG&gt; and &lt;STRONG&gt;Type2.jpg&lt;/STRONG&gt;, the issue I mentioned in my first message is still the same:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For &lt;STRONG&gt;Type1&lt;/STRONG&gt;, the values of the parameters &lt;STRONG&gt;Initial Intensity&lt;/STRONG&gt; and &lt;STRONG&gt;Initial Color&lt;/STRONG&gt; are set to their correct values, but the &lt;STRONG&gt;Photometric Web File&lt;/STRONG&gt; parameter presents the full path;&lt;/LI&gt;&lt;LI&gt;For &lt;STRONG&gt;Type2&lt;/STRONG&gt;, instead, the values of &lt;STRONG&gt;Initial Intensity&lt;/STRONG&gt; and &lt;STRONG&gt;Initial Color&lt;/STRONG&gt; are left to their default values, but the .IES file is loaded correctly.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Tilt Angle&lt;/STRONG&gt; seems to be set correctly for both types.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As already said, if the file contains more than two types, only the last processed will behave like “Type2” in the example, while all the others will behave like “Type1” in the example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I doing something wrong? Or this issue cannot be fixed (for the moment at least)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PLEASE NOTE: I have tried it with Revit versions 2017, 2018, 2019 and 2020, and the behaviour is always the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help will be greatly appreciated.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 08:01:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/fbx-light-photometric-file-absolute-ies-path-issue/m-p/9239566#M60291</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-09T08:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: FBX_LIGHT_PHOTOMETRIC_FILE, absolute IES path issue</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/fbx-light-photometric-file-absolute-ies-path-issue/m-p/9482310#M60292</link>
      <description>&lt;P&gt;I had the same exact problem and it seems that setting the parameter with the FamilyManager afterward fixes the problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;// The parameter's name will change depending on Revit's language

FamilyParameter familyParameter = doc.FamilyManager.get_Parameter("Photometric Web File");
doc.FamilyManager.Set(familyParameter, @"C:\Users\bianc\Desktop\PIL_071451.IES");&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it doesn't work straight away, try to doc.Regenerate() before setting the parameter.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 11:12:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/fbx-light-photometric-file-absolute-ies-path-issue/m-p/9482310#M60292</guid>
      <dc:creator>franjavigarciavalencia</dc:creator>
      <dc:date>2020-04-30T11:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: FBX_LIGHT_PHOTOMETRIC_FILE, absolute IES path issue</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/fbx-light-photometric-file-absolute-ies-path-issue/m-p/9523501#M60293</link>
      <description>&lt;P&gt;Thank you for you update.&lt;/P&gt;&lt;P&gt;Unfourtunately, your suggestion corresponds to what I'm already doing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This way, in the "Photometric Web File" parameter is written the whole path of the folder from which the plugin uploads the .ies file itself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is exactly what I want to avoid, because this way the .ies file is referenced externally and whenever I move it from its original location (or if I send the .rfa file to another person), the .ies file is no more readable inside the .rfa file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want to obtain is to reproduce exactly with the plugin the manual uploading of a .ies file inside the "Photometric Web File" parameter, which is: you do not see the complete path anymore, but only the name of the .ies file, which is this way "loaded" inside the .rfa file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have further suggestions on this topic, please let me know.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;Bye&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 11:33:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/fbx-light-photometric-file-absolute-ies-path-issue/m-p/9523501#M60293</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-18T11:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: FBX_LIGHT_PHOTOMETRIC_FILE, absolute IES path issue</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/fbx-light-photometric-file-absolute-ies-path-issue/m-p/9528866#M60294</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;What I suggest is using both methods, not just one. That's what fixed my problem which seems to be the same as yours.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;private void Create_rfa_files()
    {
        this.doc = application.OpenDocumentFile(@"C:\Users\bianc\Desktop\Template1.rfa");

        Transaction transaction = new Transaction(doc);
        transaction.Start("Set IES file");

        LightFamily lightFamily = LightFamily.GetLightFamily(doc);
        lightFamily.SetLightDistributionStyle(LightDistributionStyle.PhotometricWeb);

        for (int index = 0; index &amp;lt; lightFamily.GetNumberOfLightTypes(); index++)
        {
            LightType lightData = lightFamily.GetLightType(index);

            PhotometricWebLightDistribution lightDistribution = lightData.GetLightDistribution() as PhotometricWebLightDistribution;
            lightDistribution.PhotometricWebFile = @"C:\Users\bianc\Desktop\PIL_071451.IES";
            lightDistribution.TiltAngle = Math.PI / 2;    // use radian value to set
            lightData.SetLightDistribution(lightDistribution);  // set back

            InitialColor initColor = lightData.GetInitialColor();
            CustomInitialColor customInitialColor = initColor as CustomInitialColor;
            double colorTemperature = customInitialColor.Temperature;
            customInitialColor.Temperature = 2577;
            lightData.SetInitialColor(customInitialColor);

            double efficacy = 9387.55 / 123.33;
            lightData.SetInitialIntensity(new InitialWattageIntensity(efficacy, 123.33));
            lightData.SetInitialIntensity(new InitialFluxIntensity(9387.55));
        }
        doc.Regenerate();

        FamilyParameter familyParameter = doc.FamilyManager.get_Parameter("Photometric Web File");
        doc.FamilyManager.Set(familyParameter, @"C:\Users\bianc\Desktop\PIL_071451.IES");

        transaction.Commit();

        string destinationFile = @"C:\Users\bianc\Desktop\familyTest.rfa";
        doc.SaveAs(destinationFile);
    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2020 09:03:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/fbx-light-photometric-file-absolute-ies-path-issue/m-p/9528866#M60294</guid>
      <dc:creator>franjavigarciavalencia</dc:creator>
      <dc:date>2020-05-20T09:03:35Z</dc:date>
    </item>
  </channel>
</rss>

