I’ve developed an ms access based application. In this application i create a new shapefile with “handmade” polygon objects, via three routines: one creates the shapefile on disk, - Shapefiletype POLYGON, one creates the polygon objects and one that loops through a table, gathers all affected records, and adds new records to the shapefile with the objects of routine 2.
This works perfectly, - i can load that shapefile in MapWinGis-OCX and in QGis, - no problem here.
Now i want to add a routine to update the shape-Object of specific Shapefile-Records.
For this i open the previously generated shapefile from disk, startEdtingShapes(true) → returns true, create a new polygon object with the same routine used to create the shapefile and use the .EditUpdateShape-Method to update the shape-object.
The EditUpdateShape-Method does not throw an error when updating the shape-object, and in this routine there is already a buildin check if the shapetypes of file and new object match, - but when i call shapefile.save() or .stopeditngshapes(true,true) to save the changes this way the error message i get is:
Shape type is incompatible with the shapefile type.
i took the source code of the current release version, created my own debug version and debuged this behaviour in vs 2019.
When .EditUpdateShape is entered the newShape-object gets passed correctly and is of type POLYGON with parts, points and a boundary, but when stopeditingshapes is called the routine VerifyMemShapes tells me for this updated shapeindex, that the object stored there is not present any
longer (no parts, no points, no extend, random numbers vor _shapeType) and so that routine fails.
The shapefile is disk based, and since the application can write / create that file, it’s obviously no rights-problem.
I tried it with fastmode on and off, no changes here.
I’m a bit lost here and happy about any idea that might help.