Select to view content in your preferred language

How to remove M aware in Python script?

2812
3
Jump to solution
06-24-2016 11:40 AM
YufengGou
Emerging Contributor

I write a GP tool to create and publish Feature service automatically. The Data is stored in Oracle and we upgrade it to be a GeoDatabase. I use MakeFeatureLayer_management to create a layer and publish it as an editable Feature Service.

For Oracle GType 4001, oracle treat it as no measure data, but ESRI will treat it as m aware. So how can I disable the m aware in the script?

0 Kudos
1 Solution

Accepted Solutions
YufengGou
Emerging Contributor

I finally solved the issue by hacking the EFLAG value in layer, changing the corresponding binary value from 1 to 0. It is only needed for arcgis 10.4. For 10.5, you can configure it in the arcgis manager.

View solution in original post

0 Kudos
3 Replies
DarrenWiens2
MVP Honored Contributor

I would look into the outputMflag environment​ setting, although it looks like Make Feature Layer doesn't use that environment setting. You may have to write a new file to disk using a tool like Copy Features first.

0 Kudos
YufengGou
Emerging Contributor

Darren,

Thank you so much. I and new to GIS and may my question is stupid.

The work flow for my current implementation to create and publish an editable feature service is: Register the table to geodatabase --> Create a Feature layer against the table (MakeFeatureLayer_management) -->add layer to empty map (arcpy.mapping.AddLayer) --> copy map to scratch file --> publish. 

My concern is: we need to edit the feature service in other apps by JS rest call, is the copy feature method will syn the data as we expected? if yes, when we set up the env to be hasM disabled, does it overwrite the old data with m values?

The client asked us to keep the old data as it is, and disable the hasM. Not sure if there is a way.......

0 Kudos
YufengGou
Emerging Contributor

I finally solved the issue by hacking the EFLAG value in layer, changing the corresponding binary value from 1 to 0. It is only needed for arcgis 10.4. For 10.5, you can configure it in the arcgis manager.

0 Kudos