<?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 回复： Modifying string items in Property Definition List does not show in Properties Palette (*Error getting value*) in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/modifying-string-items-in-property-definition-list-does-not-show/m-p/12069044#M8329</link>
    <description>&lt;P&gt;If you rename a ListDefinition item then all Property Sets that use this item will reflect the renamed item.&lt;BR /&gt;I have never used Civil 3D but there is some content from Autodesk University that might help. It makes use of VBScript and at the end of a plug-in written in .NET which is not exposed.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.autodesk.com/autodesk-university/class/Using-Automation-Civil-3D-Construction-Documentation-and-Exports-2018" target="_blank" rel="noopener"&gt;https://www.autodesk.com/autodesk-university/class/Using-Automation-Civil-3D-Construction-Documentation-and-Exports-2018&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;If possible expose your solutions here because it helps for me and others.&lt;/P&gt;</description>
    <pubDate>Thu, 29 Jun 2023 12:26:35 GMT</pubDate>
    <dc:creator>Gepaha</dc:creator>
    <dc:date>2023-06-29T12:26:35Z</dc:date>
    <item>
      <title>Modifying string items in Property Definition List does not show in Properties Palette (*Error getting value*)</title>
      <link>https://forums.autodesk.com/t5/net-forum/modifying-string-items-in-property-definition-list-does-not-show/m-p/12063581#M8324</link>
      <description>&lt;P&gt;Short: After progmatically updating the List Items in the List Definition of a Property Definition, the items in the Style Manager are correct, but the list of available values either does not update or shows *Error getting value*. I'm using the same code and sometimes get one and sometimes the other result.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Mostly, it helps to close the Properties Panel (to click on x, not just hide it) and reopen it and then the updated values show.&lt;BR /&gt;Sometimes it doesn't and then I have to Remove Property Set in GUI and then re-add it.&lt;BR /&gt;&lt;BR /&gt;What am I missing? Is there a way to progmatically update/refresh/reload the PROPERTIES &amp;gt; Extended Data tab?&lt;BR /&gt;&lt;BR /&gt;Photos:&lt;BR /&gt;I'm modifying the Property Set Definition called NVSurfaceStyles.&lt;BR /&gt;Property Definition called SurfaceStyle has a source ListDefinition SurfaceStyles-NV.&lt;BR /&gt;All is OK in Style Manager.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-06-27 134517.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1233675i3D6279BA9B6E19F2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2023-06-27 134517.png" alt="Screenshot 2023-06-27 134517.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-06-27 134609.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1233676iC98D14D33161A72A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2023-06-27 134609.png" alt="Screenshot 2023-06-27 134609.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-06-27 135043.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1233677iCB4C30F910A3FE61/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2023-06-27 135043.png" alt="Screenshot 2023-06-27 135043.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-06-27 135131.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1233678iC02B5B8A861F9E9E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2023-06-27 135131.png" alt="Screenshot 2023-06-27 135131.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The code that I'm using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;using Autodesk.Aec.DatabaseServices;
using Autodesk.Aec.PropertyData.DatabaseServices;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;

using System.Collections.Generic;

using ObjectId = Autodesk.AutoCAD.DatabaseServices.ObjectId;&lt;/LI-CODE&gt;&lt;LI-CODE lang="csharp"&gt;        Database _db = Application.DocumentManager.MdiActiveDocument.Database;

        internal void ImportStyleNamesToPropertySetListDefinitions()
        {
            ObjectId propertySetDefinitionId = ObjectId.Null;
            List&amp;lt;string&amp;gt; stylesToAdd = new List&amp;lt;string&amp;gt;();

            using (var tr = _db.TransactionManager.StartTransaction())
            {
                // open property set definition
                var propSetDef = tr.GetObject(propertySetDefinitionId, OpenMode.ForWrite) as PropertySetDefinition;

                // for each of the definitions in it
                foreach (PropertyDefinition propDefinition in propSetDef.Definitions)
                {
                    // go by name
                    if (propDefinition.Name == "SurfaceStyle")
                    {
                        if (propDefinition.DataType == Autodesk.Aec.PropertyData.DataType.List)
                        {
                            // get source list definition id
                            var listDefinitionId = propDefinition.ListDefinitionId;

                            // open this list definition
                            var listDefinition = tr.GetObject(listDefinitionId, OpenMode.ForWrite) as ListDefinition;

                            // add style name items to it
                            foreach (string styleName in stylesToAdd)
                                listDefinition.AddListItem(styleName);
                        }
                    }
                    
                }
                tr.Commit();
            }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;protected void ClearPropertyListDefinitions(ObjectId propertySetDefinitionId)
        {
            using (var tr = _db.TransactionManager.StartTransaction())
            {
                // open property set definition
                var propSetDef = tr.GetObject(propertySetDefinitionId, OpenMode.ForRead) as PropertySetDefinition;

                // for each of the definitions in it
                foreach (PropertyDefinition propDefinition in propSetDef.Definitions)
                {
                    // find correct property definitions
                    if (propDefinition.Name == "SurfaceStyle")
                    {
                        if (propDefinition.DataType == Autodesk.Aec.PropertyData.DataType.List)
                        {
                            // get source list definition id
                            var listDefinitionId = propDefinition.ListDefinitionId;

                            // open source list definition
                            var listDefinition = tr.GetObject(listDefinitionId, OpenMode.ForWrite) as ListDefinition;

                            // clear items that are not "-"
                            ObjectIdCollection itemIds = listDefinition.GetListItems();
                            for (int i = itemIds.Count - 1; i &amp;gt;= 0; i--)
                            {
                                var item = tr.GetObject(itemIds[i], OpenMode.ForWrite) as ListItem;
                                if (item.Name != "-")
                                    listDefinition.DeleteListItem(itemIds[i]);
                            }
                        }
                    }
                }
                tr.Commit();
            }&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 12:44:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/modifying-string-items-in-property-definition-list-does-not-show/m-p/12063581#M8324</guid>
      <dc:creator>tipitasa</dc:creator>
      <dc:date>2023-06-27T12:44:04Z</dc:date>
    </item>
    <item>
      <title>回复： Modifying string items in Property Definition List does not show in Properties Palette (*Error getting value*)</title>
      <link>https://forums.autodesk.com/t5/net-forum/modifying-string-items-in-property-definition-list-does-not-show/m-p/12063612#M8325</link>
      <description>&lt;P&gt;I responded to the other post.&lt;BR /&gt;From the images I assume you are using Civil 3D.&lt;BR /&gt;I have ACA/MEP, I don't have Civil 3D installed.&lt;BR /&gt;So I can't test this in Civil 3D.&lt;/P&gt;&lt;P&gt;Code that I have tested and for me it works correctly.&amp;nbsp;Note that I added propDefinition.SubSetDatabaseDefaults(db);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;        public static void ModifyListDefinitionFromPropertySetDefinition()
        {
            Database db = Application.DocumentManager.MdiActiveDocument.Database;

            string propSetDefName = "MyPropertySetDefinition";
            List&amp;lt;string&amp;gt; stylesToAdd = new List&amp;lt;string&amp;gt;(){"First", "Second", "Third"};

            using (Transaction tr = db.TransactionManager.StartTransaction())
            {
                DictionaryPropertySetDefinitions psdDict = new DictionaryPropertySetDefinitions(db);

                if (psdDict.Has(propSetDefName, tr))
                {
                    AcDb.ObjectId propSetDefId = psdDict.GetAt(propSetDefName);                   

                    // open property set definition
                    var propSetDef = tr.GetObject(propSetDefId, OpenMode.ForWrite) as PropertySetDefinition;

                    // for each of the definitions in it
                    foreach (PropertyDefinition propDefinition in propSetDef.Definitions)
                    {
                        // go by name
                        if (propDefinition.Name == "SomeName")
                        {
                            if (propDefinition.DataType == Autodesk.Aec.PropertyData.DataType.List)
                            {
                                // get source list definition id
                                var listDefinitionId = propDefinition.ListDefinitionId;

                                // open this list definition
                                var listDefinition = tr.GetObject(listDefinitionId, OpenMode.ForWrite) as ListDefinition;

                                // add style name items to it
                                foreach (string styleName in stylesToAdd)
                                    listDefinition.AddListItem(styleName);

                                propDefinition.SubSetDatabaseDefaults(db);
                                tr.Commit();
                            }
                        }                       
                    }
                }               
            }
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 13:06:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/modifying-string-items-in-property-definition-list-does-not-show/m-p/12063612#M8325</guid>
      <dc:creator>Gepaha</dc:creator>
      <dc:date>2023-06-27T13:06:08Z</dc:date>
    </item>
    <item>
      <title>回复： Modifying string items in Property Definition List does not show in Properties Palette (*Error getting value*)</title>
      <link>https://forums.autodesk.com/t5/net-forum/modifying-string-items-in-property-definition-list-does-not-show/m-p/12065833#M8326</link>
      <description>&lt;P&gt;I'll just reply here, as my current issue is connected with the title of this post. And I'll link the other one&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/net/modify-list-definition-for-a-manual-property-definition/td-p/12055826" target="_blank" rel="noopener"&gt;here&lt;/A&gt;&amp;nbsp;for reference.&lt;BR /&gt;&lt;BR /&gt;Actually Adding the List Items works for me too.&lt;BR /&gt;But removing does not - did you also try removing by calling:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;                            ObjectIdCollection itemIds = listDefinition.GetListItems();
                            for (int i = itemIds.Count - 1; i &amp;gt;= 0; i--)
                            {
                                var item = tr.GetObject(itemIds[i], OpenMode.ForWrite) as ListItem;
                                if (item.Name != "-")
                                {
                                    listDefinition.DeleteListItem(itemIds[i]);
                                }
                            }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I also tried by removing all items from the list and then re-adding "-". (as this is the default value that I'd like to keep).&lt;BR /&gt;&lt;BR /&gt;The first time this runs, it produces the *Error getting value* message, even though nothing in the code fails.&lt;BR /&gt;Then, I manually remove and add back the same Property Set to the selected surface.&lt;BR /&gt;And after, the same code runs correctly.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2023 08:38:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/modifying-string-items-in-property-definition-list-does-not-show/m-p/12065833#M8326</guid>
      <dc:creator>tipitasa</dc:creator>
      <dc:date>2023-06-28T08:38:52Z</dc:date>
    </item>
    <item>
      <title>回复： Modifying string items in Property Definition List does not show in Properties Palette (*Error getting value*)</title>
      <link>https://forums.autodesk.com/t5/net-forum/modifying-string-items-in-property-definition-list-does-not-show/m-p/12067042#M8327</link>
      <description>&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;I tested your code and it works correctly for me. &lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT&gt;&lt;FONT&gt;Regarding the error message "&lt;STRONG&gt;*Error getting value*&lt;/STRONG&gt;" in the "Properties Extended Data" tab, you will always receive if an item from ListDefinition that is in use is deleted via code. In principle you could not delete a value in use. I would have to first change the value and then delete it. &lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT&gt;&lt;FONT&gt;Note that if you try to remove an item in use through "StyleManager&amp;gt;Multi-Potpose Objects&amp;gt;List Definitions" it will not be possible because the remove button will not be enabled.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;The *Error getting value* when deleting an item in use via code:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gphanauer_0-1687970709472.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1234362i2F3BE735D10E2EDB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gphanauer_0-1687970709472.png" alt="gphanauer_0-1687970709472.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;When an item is in use, it cannot be removed:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gphanauer_1-1687971023116.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1234364i69E6304272DE0372/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gphanauer_1-1687971023116.png" alt="gphanauer_1-1687971023116.png" /&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2023 17:06:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/modifying-string-items-in-property-definition-list-does-not-show/m-p/12067042#M8327</guid>
      <dc:creator>Gepaha</dc:creator>
      <dc:date>2023-06-28T17:06:27Z</dc:date>
    </item>
    <item>
      <title>回复： Modifying string items in Property Definition List does not show in Properties Palette (*Error getting value*)</title>
      <link>https://forums.autodesk.com/t5/net-forum/modifying-string-items-in-property-definition-list-does-not-show/m-p/12068642#M8328</link>
      <description>&lt;P&gt;That was exactly it, so thank you. I didn't think about the connection of Property Set Value on a surface and that same List Item in the List Definition, I saw it only as a 'free floating' string.&lt;BR /&gt;&lt;BR /&gt;What I do now is, that I progmatically remove and re-add the Property Set to each surface that was using the cleared ListDefinition and assign the correct property values.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2023 09:10:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/modifying-string-items-in-property-definition-list-does-not-show/m-p/12068642#M8328</guid>
      <dc:creator>tipitasa</dc:creator>
      <dc:date>2023-06-29T09:10:31Z</dc:date>
    </item>
    <item>
      <title>回复： Modifying string items in Property Definition List does not show in Properties Palette (*Error getting value*)</title>
      <link>https://forums.autodesk.com/t5/net-forum/modifying-string-items-in-property-definition-list-does-not-show/m-p/12069044#M8329</link>
      <description>&lt;P&gt;If you rename a ListDefinition item then all Property Sets that use this item will reflect the renamed item.&lt;BR /&gt;I have never used Civil 3D but there is some content from Autodesk University that might help. It makes use of VBScript and at the end of a plug-in written in .NET which is not exposed.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.autodesk.com/autodesk-university/class/Using-Automation-Civil-3D-Construction-Documentation-and-Exports-2018" target="_blank" rel="noopener"&gt;https://www.autodesk.com/autodesk-university/class/Using-Automation-Civil-3D-Construction-Documentation-and-Exports-2018&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;If possible expose your solutions here because it helps for me and others.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2023 12:26:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/modifying-string-items-in-property-definition-list-does-not-show/m-p/12069044#M8329</guid>
      <dc:creator>Gepaha</dc:creator>
      <dc:date>2023-06-29T12:26:35Z</dc:date>
    </item>
    <item>
      <title>回复： Modifying string items in Property Definition List does not show in Properties Palette (*Error getting value*)</title>
      <link>https://forums.autodesk.com/t5/net-forum/modifying-string-items-in-property-definition-list-does-not-show/m-p/12069137#M8330</link>
      <description>&lt;P&gt;That's a good note.&lt;BR /&gt;&lt;BR /&gt;What I did is, that I call this next method after the closing } of the Transaction using in the&amp;nbsp;ClearPropertyListDefinition().&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;RebuildSurfacesWithUpdatedPropertySet(propertySetDefinitionId, clearSurfaceStyles);&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;So as a whole, both together:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;        protected void ClearPropertyListDefinitions(ObjectId propertySetDefinitionId, bool clearSurfaceStyles)
        {
            using (var tr = _db.TransactionManager.StartTransaction())
            {
                // open property set definition
                var propSetDef = tr.GetObject(propertySetDefinitionId, OpenMode.ForRead) as PropertySetDefinition;

                // for each of the definitions in it
                foreach (PropertyDefinition propDefinition in propSetDef.Definitions)
                {
                    // find correct property definitions
                    if (clearSurfaceStyles &amp;amp;&amp;amp; propDefinition.Name == "SurfaceStyle")
                    {
                        if (propDefinition.DataType == Autodesk.Aec.PropertyData.DataType.List)
                        {
                            // get source list definition id
                            var listDefinitionId = propDefinition.ListDefinitionId;

                            // open source list definition
                            var listDefinition = tr.GetObject(listDefinitionId, OpenMode.ForWrite) as ListDefinition;

                            // clear items that are not "-"
                            ObjectIdCollection itemIds = listDefinition.GetListItems();
                            for (int i = itemIds.Count - 1; i &amp;gt;= 0; i--)
                            {
                                var item = tr.GetObject(itemIds[i], OpenMode.ForWrite) as ListItem;
                                if (item.Name != "-")
                                    listDefinition.DeleteListItem(itemIds[i]);
                            }
                        }
                    }
                }
                tr.Commit();
            }
			
			RebuildSurfacesWithUpdatedPropertySet(propertySetDefinitionId, clearSurfaceStyles);
		}&lt;/LI-CODE&gt;&lt;LI-CODE lang="csharp"&gt;       /**
         * if a surface was using a deleted list item in it's property set value
         * it produces a display of *Error getting value* in the Extended Data on GUI
         * 
         * Take all tin surfaces in the drawing
         * that use the property set definition by propertySetDefinitionId
         * that had it's list items deleted.
         * 
         * Depending on the values of the booleans
         *   - clearedSurfaceStyles
         *   - clearedProfileStyles
         *   - clearedSectionStyles
         * if true use a default "-"  
         * else remember the previously set value of the property
         * then remove property set from the surface
         * re-add it
         * apply correct property values
         */
        protected void RebuildSurfacesWithUpdatedPropertySet(ObjectId propSetDefintionId, bool clearedSurfaceStyles)
        {
            var surfaceIds = Autodesk.Civil.ApplicationServices.CivilApplication.ActiveDocument.GetSurfaceIds();
			CQAecSurfaceTools.GetTinSurfaceIds();   
            PropertySet modifiedPropSet = null;
            using (var tr = _db.TransactionManager.StartTransaction())
            {
                foreach (var surfaceId in surfaceIds)
                {
                    var surface = tr.GetObject(surfaceId, OpenMode.ForWrite);

                    ObjectIdCollection propSetIds = PropertyDataServices.GetPropertySets(surface);
                    foreach (ObjectId propSetId in propSetIds)
                    {
                        try
                        {
                            // does it use the property set definition in question
                            PropertySet propSet = tr.GetObject(propSetId, OpenMode.ForWrite) as PropertySet;
                            if (propSet.PropertySetDefinition == propSetDefintionId)
                            {
                                modifiedPropSet = propSet;
                                break;
                            }
                        }
                        catch { }
                    }

                    // remember property values
                    string surfaceStylePropValue = (clearedSurfaceStyles) ? "-" : (string)modifiedPropSet.GetAt(modifiedPropSet.PropertyNameToId("SurfaceStyle"));
                    string surfaceName = "";
                    try
                    {
                        surfaceName = (string)modifiedPropSet.GetAt(modifiedPropSet.PropertyNameToId("SurfaceName"));
                    }
                    catch { }

                    // remove property set
                    PropertyDataServices.RemovePropertySet(surface, propSetDefintionId);

                    // re-add property set
                    PropertyDataServices.AddPropertySet(surface, propSetDefintionId);

                    // add property values
                    propSetIds = PropertyDataServices.GetPropertySets(surface);
                    foreach (ObjectId propSetId in propSetIds)
                    {
                        try
                        {
                            PropertySet reAddedPropSet = tr.GetObject(propSetId, OpenMode.ForRead) as PropertySet;
                            if (reAddedPropSet.PropertySetDefinition == propSetDefintionId)
                            {
                                reAddedPropSet.UpgradeOpen();
                                reAddedPropSet.SetAt(reAddedPropSet.PropertyNameToId("SurfaceName"), surfaceName);
                                reAddedPropSet.SetAt(reAddedPropSet.PropertyNameToId("SurfaceStyle"), surfaceStylePropValue);
                                break;
                            }
                        }
                        catch { }
                    }

                    surface.DowngradeOpen();
                }
                tr.Commit();
            }
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2023 13:07:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/modifying-string-items-in-property-definition-list-does-not-show/m-p/12069137#M8330</guid>
      <dc:creator>tipitasa</dc:creator>
      <dc:date>2023-06-29T13:07:18Z</dc:date>
    </item>
  </channel>
</rss>

