It looks like you're new here. If you want to get involved, click one of these buttons!
I have this code to create a new layer:
LayerTable lt = (LayerTable)tr.GetObject(db.LayerTableId, OpenMode.ForWrite); if (lt.Has(layerName)) return; LayerTableRecord x = new LayerTableRecord(); x.Name = layerName; x.LineWeight = LineWeight.ByLineWeightDefault; x.IsOff = false; x.IsFrozen = false; x.IsLocked = false; x.Color = c; x.IsPlottable = true; x.Description = layerDescription; lt.Add(x); tr.AddNewlyCreatedDBObject(x, true);
When the line
x.Description = layerDescription;
is executed I have an eNotDatabase exception.
This sounds very strange for me and I don't understand where the problem is.
Thank you very much