<?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: How do you extract Line width and Scale from scale-based sizing (Unique Values) in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-do-you-extract-line-width-and-scale-from-scale/m-p/1289554#M67653</link>
    <description>&lt;P&gt;Could you just read the .lyr file with JSON loads and then grab it from there, or do you have to go through other means?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;variable = json.loads(r'path to .lyr')

for dct in variable['scaleDependentSizeVariation']:
    for k, v in dct.items():
        print(f'k: {k} v: {v}')&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 16 May 2023 13:10:52 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2023-05-16T13:10:52Z</dc:date>
    <item>
      <title>How do you extract Line width and Scale from scale-based sizing (Unique Values)</title>
      <link>https://community.esri.com/t5/python-questions/how-do-you-extract-line-width-and-scale-from-scale/m-p/1289543#M67652</link>
      <description>&lt;P&gt;Hi, I'm trying to extract information about Scales and line width at these scales using Python (Notebooks). I tried to use CIM, but I hadn't accessed&amp;nbsp;"scaleDependentSizeVariation" from lyr. I can see this information in JSON (.lyr) file, but I don't know how to extract this information.&lt;/P&gt;&lt;PRE&gt;  "scaleDependentSizeVariation" : [&lt;BR /&gt;    {&lt;BR /&gt;      "type" : "CIMScaleDependentSizeVariation",&lt;BR /&gt;      "scale" : 1000000000,&lt;BR /&gt;      "size" : 1.7291338582677165&lt;BR /&gt;    },&lt;BR /&gt;    {&lt;BR /&gt;      "type" : "CIMScaleDependentSizeVariation",&lt;BR /&gt;      "scale" : 120944,&lt;BR /&gt;      "size" : 2&lt;BR /&gt;    },&lt;BR /&gt;    {&lt;BR /&gt;      "type" : "CIMScaleDependentSizeVariation",&lt;BR /&gt;      "scale" : 60472,&lt;BR /&gt;      "size" : 2.5&lt;BR /&gt;    },&lt;BR /&gt;    {&lt;BR /&gt;      "type" : "CIMScaleDependentSizeVariation",&lt;BR /&gt;      "scale" : 30236,&lt;BR /&gt;      "size" : 2.9763999999999999&lt;BR /&gt;    },&lt;BR /&gt;    {&lt;BR /&gt;      "type" : "CIMScaleDependentSizeVariation",&lt;BR /&gt;      "scale" : 25000,&lt;BR /&gt;      "size" : 2.5&lt;BR /&gt;    },&lt;BR /&gt;    {&lt;BR /&gt;      "type" : "CIMScaleDependentSizeVariation",&lt;BR /&gt;      "scale" : 15118,&lt;BR /&gt;      "size" : 3.5&lt;BR /&gt;    }&lt;BR /&gt;  ]&lt;BR /&gt;},&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AdrBrez_0-1684239198518.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/70790i969B00FDA5BBF190/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AdrBrez_0-1684239198518.png" alt="AdrBrez_0-1684239198518.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2023 12:15:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-you-extract-line-width-and-scale-from-scale/m-p/1289543#M67652</guid>
      <dc:creator>AdrBrez</dc:creator>
      <dc:date>2023-05-16T12:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do you extract Line width and Scale from scale-based sizing (Unique Values)</title>
      <link>https://community.esri.com/t5/python-questions/how-do-you-extract-line-width-and-scale-from-scale/m-p/1289554#M67653</link>
      <description>&lt;P&gt;Could you just read the .lyr file with JSON loads and then grab it from there, or do you have to go through other means?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;variable = json.loads(r'path to .lyr')

for dct in variable['scaleDependentSizeVariation']:
    for k, v in dct.items():
        print(f'k: {k} v: {v}')&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 16 May 2023 13:10:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-you-extract-line-width-and-scale-from-scale/m-p/1289554#M67653</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2023-05-16T13:10:52Z</dc:date>
    </item>
  </channel>
</rss>

