<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SetMDomain not working in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/setmdomain-not-working/m-p/107946#M8325</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Roger,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I just tried the following code on a river network I have and it did not produce an error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color:#008000;"&gt;# Layer name in Map Document
&lt;/SPAN&gt;s = "Rivers"

&lt;SPAN style="color:#008000;"&gt;# Describe object and print name string to confirm it worked
&lt;/SPAN&gt;desc = arcpy.Describe(s)
print desc.namestring

&lt;SPAN style="color:#008000;"&gt;# Get spatial reference and print name
&lt;/SPAN&gt;sr = desc.spatialreference
print sr.name

&lt;SPAN style="color:#008000;"&gt;# Get FeatureClass and check if M aware
&lt;/SPAN&gt;fc = desc.featureclass
print fc.hasm

&lt;SPAN style="color:#008000;"&gt;# Set M domain
&lt;/SPAN&gt;sr.setmdomain( -1000,1000)
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This would suggest that there is something odd with your layer as your code looks sound?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Duncan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 06:31:40 GMT</pubDate>
    <dc:creator>DuncanHornby</dc:creator>
    <dc:date>2021-12-11T06:31:40Z</dc:date>
    <item>
      <title>SetMDomain not working</title>
      <link>https://community.esri.com/t5/python-questions/setmdomain-not-working/m-p/107945#M8324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Anyone know why this doesn't work:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;sr = arcpy.Describe(my_bathy).spatialReference&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sr.setMDomain(-100000, 100000)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ZM are both enabled for my_bathy.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, Roger&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2012 02:17:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setmdomain-not-working/m-p/107945#M8324</guid>
      <dc:creator>RogerLoweth</dc:creator>
      <dc:date>2012-01-03T02:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: SetMDomain not working</title>
      <link>https://community.esri.com/t5/python-questions/setmdomain-not-working/m-p/107946#M8325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Roger,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I just tried the following code on a river network I have and it did not produce an error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color:#008000;"&gt;# Layer name in Map Document
&lt;/SPAN&gt;s = "Rivers"

&lt;SPAN style="color:#008000;"&gt;# Describe object and print name string to confirm it worked
&lt;/SPAN&gt;desc = arcpy.Describe(s)
print desc.namestring

&lt;SPAN style="color:#008000;"&gt;# Get spatial reference and print name
&lt;/SPAN&gt;sr = desc.spatialreference
print sr.name

&lt;SPAN style="color:#008000;"&gt;# Get FeatureClass and check if M aware
&lt;/SPAN&gt;fc = desc.featureclass
print fc.hasm

&lt;SPAN style="color:#008000;"&gt;# Set M domain
&lt;/SPAN&gt;sr.setmdomain( -1000,1000)
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This would suggest that there is something odd with your layer as your code looks sound?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Duncan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:31:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setmdomain-not-working/m-p/107946#M8325</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2021-12-11T06:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: SetMDomain not working</title>
      <link>https://community.esri.com/t5/python-questions/setmdomain-not-working/m-p/107947#M8326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Duncan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Finger trouble with upper/lower case - misdirection from ESRI helpfile.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers, Roger&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Roger,&lt;BR /&gt;&lt;BR /&gt;I just tried the following code on a river network I have and it did not produce an error.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color:#008000;"&gt;# Layer name in Map Document
&lt;/SPAN&gt;s = "Rivers"

&lt;SPAN style="color:#008000;"&gt;# Describe object and print name string to confirm it worked
&lt;/SPAN&gt;desc = arcpy.Describe(s)
print desc.namestring

&lt;SPAN style="color:#008000;"&gt;# Get spatial reference and print name
&lt;/SPAN&gt;sr = desc.spatialreference
print sr.name

&lt;SPAN style="color:#008000;"&gt;# Get FeatureClass and check if M aware
&lt;/SPAN&gt;fc = desc.featureclass
print fc.hasm

&lt;SPAN style="color:#008000;"&gt;# Set M domain
&lt;/SPAN&gt;sr.setmdomain( -1000,1000)
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;This would suggest that there is something odd with your layer as your code looks sound?&lt;BR /&gt;&lt;BR /&gt;Duncan&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:31:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setmdomain-not-working/m-p/107947#M8326</guid>
      <dc:creator>RogerLoweth</dc:creator>
      <dc:date>2021-12-11T06:31:43Z</dc:date>
    </item>
  </channel>
</rss>

