3

I use fdo and c# to connect to spatial data base postgis from Autocad Map 3D, when I insert a new element to a table , the database update attribute 'id' and 'id_rev' (primary key) from a sequence, but in Autocad Map 3d 2014 it appears the new record with id and id_rev as nulls, and then i can´t modify or delete the entity from Autocad Map

Only when I execute update layer manually, this attributes obtain the new value, and then I can modify or delete this new record. How I update the layer from the code?.

I'd appreciate any help.

I use layer.forceRefresh() after of :

MgInsertFeatures insertarElementos = new MgInsertFeatures(featureclassName, propiedades);
MgFeatureCommandCollection comandos = new MgFeatureCommandCollection();
comandos.Add(insertarElementos);

layer.forceRefresh()

But, layer.forceRefresh() doesn't work.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
jcortega
  • 41
  • 2
  • Looks like the database has a separate table that contains the primary key and when adding new items you must insert the new id into more than one table. See the autcad specification for more help : https://web.archive.org/web/20171013020945/http://images.autodesk.com/adsk/files/autocad_2014_pdf_dxf_reference_enu.pdf – jdweng Oct 08 '19 at 12:41

0 Answers0