[Developer/ C#/ Visual studio] Document Property does not get updated when value is changed?

   //Get the current document and start the transaction
            Document cDocument = cApplication.Document;
            MessageBox.Show("Guide Area: " + guideArea + "\nGuide Name: " + guideName + "\nGuide Page: " + guidePage);

            //Document Property for Guide Area. If property exists, then don't add the property
            DataPropertyAttributes guideAreaAttributes = DataPropertyAttributes.IsCalculated |DataPropertyAttributes.IsListValued | DataPropertyAttributes.IsPersistent | DataPropertyAttributes.IsPropagated | DataPropertyAttributes.IsEditable | DataPropertyAttributes.IsSearchable | DataPropertyAttributes.IsVisible;
            DataProperty guideAreaProperty = DataProperty.CreateCustomPrototype("guide.area", DataType.String, guideAreaAttributes);
            if (!cDocument.Data.Properties.ContainsProperty(DataPropertyClass.Document, "guide.area"))
                     cDocument.Data.Properties.AddProperty(DataPropertyClass.Document, guideAreaProperty);
                MessageBox.Show("Submitting a guide.area property");
            guideAreaProperty.Value = guideArea;

This is piece of code snipped that i currently have. On windows form, each time a user clicks on a submit button, this function will be called. During my first attempt to hit on submit button, my document property was added with a particular value. In my second attempt if i wanted to change the value of the document property, it would not change and would remain the same value as the first attempt. How can i update the document property?


Never mind. Problem has been solved :)

fahman_khan75 - Jul 14, 2016 - 9:34am ::

Any help would be appreciated...

fahman_khan75 - Jul 14, 2016 - 8:29am ::
+ Add a Comment

(1) Answer