Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4331

OPM CE IECInstance write property value

$
0
0

How i can set the value for a property in a instance? i can read but i cant write

        private static void SetElementPropertyValue(string lEleId, string strPropertyName, string strValue, String ID)
        {
            StringBuilder s = new StringBuilder();
            try
            {
                ECInstanceList allInstances = DgnUtilities.GetAllInstancesFromDgn();

                if (allInstances != null && allInstances.Count > 0)
                {
                    foreach (IECInstance instance in allInstances)
                    {
                        string GUID = GetValue(instance, "GUID");
                        if (GUID == lEleId)
                        {
                            MessageBox.Show("Colocando Valor: " + GUID.ToString() + strPropertyName + " " + strValue);
                            instance[strPropertyName].StringValue = strValue;
                        }

                    }
                }
                }

Viewing all articles
Browse latest Browse all 4331


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>