vb.net code bringing in a feature service, not drawing on the map

1215
6
03-21-2019 08:26 AM
SamanthaHughes
Emerging Contributor

.net bring in a feature service, is no longer drawing in ArcGIS Pro 2.2.

Absolutely fine in 2.0, occasionally would do this. However when I use code to bring in the service layer into Pro, it doesn't draw it, even though its open and you can see the attribute table. (Its not under the base mapping either )

If we go to symbology and change it to single symbol, it appears.

If we then change it back to graduated symbol it stays.

Has anyone else experienced this and found a solution?

I have already tried re-creating the service from scratch and republishing. Both failed.

TIA

0 Kudos
6 Replies
MatthewDriscoll
MVP Alum

Have you tried refreshing your map?  I have seen this behavior in both Pro SDK and Python Scripts for Pro.  Pro is suppose to not need to be refreshed so there really is no code for it.  One work around I had was to zoom in then back out a bit with the camera at the very end of my code.   Also try rebuilding your solution, it is not suppose to be needed in small children version builds but I have found it to correct some issues in the past.    

0 Kudos
SamanthaHughes
Emerging Contributor

Thanks Matt,

Will give the rebuilding a go, because I already tried the zooming in and out part. ☺

In my code I move my layer to refresh!! Please add a refresh ESRI! ☺

Thanks for the ideas. Will feedback when I can.

S*

0 Kudos
RichRuh
Esri Regular Contributor
SamanthaHughes
Emerging Contributor

Thanks Rich,

I can’t seem to call it in 2.2. can I double check its part of 2.2 and not 2.3...

Although I am expecting it to be part of MapView... i.e. mapview.active.map.redraw …

Do you have an example in action?

TIA, S*

0 Kudos
RichRuh
Esri Regular Contributor

It's on MapView, not Map.  So it should be 

MapView.Active.Redraw(true)

and not MapView.Active.Map...

0 Kudos
SamanthaHughes
Emerging Contributor

Cheers!

0 Kudos