arun kumar

arun kumar

  • 1.7k
  • 38
  • 876

to set property in property list (i-e) Custom properties of drawing

Aug 29 2023 9:47 AM

Hi,

pls. help me to complete this code.

refer snap-1 has function to setpropeties   

Refer snap-2 myerror

 

and this my code:

   private void button1_Click(object sender, EventArgs e)
        {

            string dsds = "\\D7489\\Drawings\\Instrumentation\\test\\CABLE TRAY LAYOUT-ICB-EAST";
            Site sitemgr1 = MiddleServiceProvider.SiteMgr.ConnectSite();
            PlantConnection modelconn1 = sitemgr1.ActivePlant.PlantModel;
            Deliverable ds = (Deliverable)EntityHelper.GetObjectByPath(dsds);
            DeliverableBase ds1 = (DeliverableBase)EntityHelper.GetObjectByPath(dsds);
            string DCC = "xxxx-xxxx";
            var allprop = ds1.GetProperties();
           ds1.SetProperties(IEnumerable < DeliverableProperty > propertiesList, string newValue)
           foreach (var property in propertiesList)
            {
                property.PropertyValue = newValue;
            }

        }

         


Answers (1)