Hi Kenneth, Hi All,
<br />
<p>
<p>I would like to create new Line (MgFeatureGeometricType.Curve) Layer , and create line feature in this new Layer , I worked with follwoing steps:

<p>
<p>1.Take Layer Definition for Exsisting Line Layer and SetResource as following

<p>
<p>MgByteReader byteReader = resourceService.GetResourceContent(layerDefResId);
XmlDocument doc = new XmlDocument();
String xmlLayerDef = byteReader.ToString();
doc.LoadXml(xmlLayerDef);
String xmlString = doc.DocumentElement.OuterXml;
MgResourceIdentifier layerDefId = new MgResourceIdentifier("Session:" + GetParameter(this.args, "SESSION") + "//NewLayer.LayerDefinition");
resourceService.SetResource(layerDefId, new MgByteReader(xmlString, "text/xml"), null);

<p>
<p>
<p>2. Insert New Layer

<p>
<p>layers.Insert(layers.IndexOf(layer), newLayer);

<p>
<p>
<p>3.Create Line Geometry

<p>
<p>MgLinearRing Line = geometryFactory.CreateLinearRing(coordinateColl);
MgGeometry Geom = geometryFactory.CreatePolygon(Line, null);

<p>
<p>4.Write Geometry and Update Featur Service

<p>
<p>propertyValues.Add(new MgGeometryProperty("Geometry", byteReader1));
updateCommands.Add(new MgInsertFeatures(className, propertyValues));
MgFeatureService featureService = (MgFeatureService)this.site.CreateService(MgServiceType.FeatureService);
featureService.UpdateFeatures(layerResId, updateCommands, false);

<p>
<p>5. Save map and refresh

<p>
<p>after previouse steps No thing appear , No bugs , No Result , Only NewLayer Created

<p>
<p>
<p>Can you help me plz to update Exsisting Line Layer ?

<p>
<p>Best Regards

<p>Akram