acmaplayer.forcerefresh() dont work

acmaplayer.forcerefresh() dont work

Anonymous
Not applicable
413 Views
2 Replies
Message 1 of 3

acmaplayer.forcerefresh() dont work

Anonymous
Not applicable

Hi! I have some code thats working with inserting, updating and deleting features.

Issue is when I do smth with my features( i.e modificate geometry or create new feature) I have an error when string

"layer.forceRefresh()" passed. 

My project layer crashed with message "gws cache feauture storage already exists" but my features which I insert appears in oracle database, but features which I update dont update in oracle database. Any suggestions how to fix it?

Dim layer As AcMapLayer = GetLayerByName("DEA_GEOM_SPATIAL")
     

        Dim classaname As String = layer.GetFeatureClassName()

        batchCollection.Clear()
        commands.Clear()
       
        
        batchCollection = layer.GetIdsOfEditSetFeatures()
       
        
        Dim updateQuery As String = ClassSystemProperties.FeatureStatus & " = " & ClassSystemProperties.FeatureStatusModified
       
        Dim strFeatureClassName = layer.GetFeatureClassName()
        
        If batchCollection.Count > 0 Then
            For Each item In batchCollection
               
               
            Dim upd As New MgUpdateFeatures(strFeatureClassName, item, updateQuery)
            commands.Add(upd)
            Dim ins As New MgInsertFeatures(strFeatureClassName, item)          
            commands.Add(ins)

            Next

            DeleteMethod(deleteQuery)
            InsertMethod(insertQuery,commands)
            UpdateMethod(updateQuery,commands)
           
           
            layer.ForceRefresh()
'layer crashed after this string with message "gws cache features storage already exist"
0 Likes
414 Views
2 Replies
Replies (2)
Message 2 of 3

braudpat
Mentor
Mentor

Hello

 

I am not at all a developper !

 

But have you tried the MAPUPDATEMAP command ?

 

Regards, Patrice

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


0 Likes
Message 3 of 3

Anonymous
Not applicable

same error when I try command mapupdatemap

0 Likes