# Sample for saving polygon or any shape with Map suite 4.0 geometry

**URL:** <https://community.thinkgeo.com/t/sample-for-saving-polygon-or-any-shape-with-map-suite-4-0-geometry/1437>\
**Category:** WinForms\
**Created:** [September 27, 2010, 3:21am UTC](https://community.thinkgeo.com/t/sample-for-saving-polygon-or-any-shape-with-map-suite-4-0-geometry/1437 "2010-09-27T03:21:56Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [October 12, 2010, 8:54am UTC](https://community.thinkgeo.com/t/sample-for-saving-polygon-or-any-shape-with-map-suite-4-0-geometry/1437/21 "2010-10-12T08:54:17Z")

</div>

Franklin,

Thanks&nbsp;for&nbsp;your&nbsp;post&nbsp;and&nbsp;feedback.  
I&nbsp;think&nbsp;the&nbsp;problem&nbsp;is&nbsp;probably&nbsp;hidden&nbsp;in&nbsp;the&nbsp;data&nbsp;testLoad.shp,&nbsp;could&nbsp;you&nbsp;open&nbsp;it&nbsp;in&nbsp;MapSuite&nbsp;Explorer&nbsp;to&nbsp;see&nbsp;if&nbsp;the&nbsp;name&nbsp;attribute&nbsp;has&nbsp;the&nbsp;value&nbsp;for&nbsp;it.&nbsp;I&nbsp;notice&nbsp;you&nbsp;use&nbsp;the&nbsp;following&nbsp;statement&nbsp;to&nbsp;add&nbsp;feature&nbsp;which&nbsp;no&nbsp;attributes&nbsp;were&nbsp;added.  
`shapeFileFetureLayer.EditTools.Add(polygonShape);`  
We&nbsp;have&nbsp;discussed&nbsp;this&nbsp;issue&nbsp;in&nbsp;another&nbsp;thread&nbsp;Post&nbsp;8259&nbsp;for&nbsp;this&nbsp;problem.  
Any&nbsp;more&nbsp;questions&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;me&nbsp;know.  
Thanks.  
Yale

---

<div class="post-metadata">

**Author:** ![franklin1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/f/e9a140/32.png) [@franklin1](https://community.thinkgeo.com/u/franklin1)\
**Post date:** [October 15, 2010, 5:10am UTC](https://community.thinkgeo.com/t/sample-for-saving-polygon-or-any-shape-with-map-suite-4-0-geometry/1437/22 "2010-10-15T05:10:37Z")

</div>

Hi&nbsp;Yale,&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;Is&nbsp;it&nbsp;possible&nbsp;to&nbsp;save&nbsp;the&nbsp;modified&nbsp;polygon&nbsp;into&nbsp;the&nbsp;same&nbsp;file&nbsp;after&nbsp;editing?&nbsp;I&nbsp;have&nbsp;no&nbsp;clue&nbsp;how&nbsp;to&nbsp;do&nbsp;it.&nbsp;Could&nbsp;you&nbsp;help&nbsp;me&nbsp;out?&nbsp;  
&nbsp;Thanks.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Franklin

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [October 15, 2010, 9:17am UTC](https://community.thinkgeo.com/t/sample-for-saving-polygon-or-any-shape-with-map-suite-4-0-geometry/1437/23 "2010-10-15T09:17:14Z")

</div>

Franklin,

Try&nbsp;following&nbsp;edit&nbsp;APIs&nbsp;by&nbsp;remove&nbsp;and&nbsp;add&nbsp;or&nbsp;Update,&nbsp;see&nbsp;following&nbsp;code&nbsp;snippet,&nbsp;hope&nbsp;it&nbsp;helps:  
`shapeFileFeturelayer.EditTools.Delete(feature.id);shapeFileFeturelayer.EditTools.Add(feature);`  
&nbsp;  
Or  
&nbsp;  
` shapeFileFeturelayer.EditTools.Update(feature);`  
&nbsp;  
Any&nbsp;more&nbsp;questions&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;me&nbsp;know.  
Thanks.  
Yang

&nbsp;

[Previous page](https://community.thinkgeo.com/t/sample-for-saving-polygon-or-any-shape-with-map-suite-4-0-geometry/1437.md?page=1)
