Label Expression in ArcPro - Capitalising and changing font/colour in Python?

My bank got bought out, am I now going to have to start filing tax returns in a different state?

Should the Product Owner dictate what info the UI needs to display?

Is Diceware more secure than a long passphrase?

Why is the underscore command _ useful?

Complex numbers z=-3-4i polar form

What to do with someone that cheated their way through university and a PhD program?

How much cash can I safely carry into the USA and avoid civil forfeiture?

Work requires me to come in early to start computer but wont let me clock in to get paid for it

Co-worker works way more than he should

Why must Chinese maps be obfuscated?

Is it acceptable to use working hours to read general interest books?

What is the most expensive material in the world that could be used to create Pun-Pun's lute?

What is purpose of DB Browser(dbbrowser.aspx) under admin tool?

Do I need to watch Ant-Man and the Wasp and Captain Marvel before watching Avengers: Endgame?

Negative Resistance

Can a stored procedure reference the database in which it is stored?

Multiple options vs single option UI

What *exactly* is electrical current, voltage, and resistance?

How to pronounce 'c++' in Spanish

A Paper Record is What I Hamper

Does a large simulator bay have standard public address announcements?

How to have a sharp product image?

std::unique_ptr of base class holding reference of derived class does not show warning in gcc compiler while naked pointer shows it. Why?

How can I practically buy stocks?



Label Expression in ArcPro - Capitalising and changing font/colour in Python?







.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















Currently Using ArcGIS Pro 2.3.2 and Python



I am currently trying to label Road names, which are all uppercase in the database. I'm unable to edit the database but would like to Capitalise the road names and pick out one street to change the font and colour for the road name.



I'm new to python and am having trouble working out how to combine these two expressions.



def FindLabel ( [road_name1] ):
S = [road_name1]
S = S.title()
return S

def FindLabel ( [road_name1] ):
if str([road_name1]) == 'LOOKOUT ROAD':
return "<CLR red='0' blue='0' green='0'><FNT size = '22'>" + [road_name1] + "</FNT></CLR>"
else:
return "<CLR red='128' blue='128' green='128'><FNT size = '14'>" + [road_name1] + "</FNT></CLR>"


Your help with this would be greatly appreciated.
Thanks,
Amanda









share







New contributor




Amanda.B is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



























    0















    Currently Using ArcGIS Pro 2.3.2 and Python



    I am currently trying to label Road names, which are all uppercase in the database. I'm unable to edit the database but would like to Capitalise the road names and pick out one street to change the font and colour for the road name.



    I'm new to python and am having trouble working out how to combine these two expressions.



    def FindLabel ( [road_name1] ):
    S = [road_name1]
    S = S.title()
    return S

    def FindLabel ( [road_name1] ):
    if str([road_name1]) == 'LOOKOUT ROAD':
    return "<CLR red='0' blue='0' green='0'><FNT size = '22'>" + [road_name1] + "</FNT></CLR>"
    else:
    return "<CLR red='128' blue='128' green='128'><FNT size = '14'>" + [road_name1] + "</FNT></CLR>"


    Your help with this would be greatly appreciated.
    Thanks,
    Amanda









    share







    New contributor




    Amanda.B is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      Currently Using ArcGIS Pro 2.3.2 and Python



      I am currently trying to label Road names, which are all uppercase in the database. I'm unable to edit the database but would like to Capitalise the road names and pick out one street to change the font and colour for the road name.



      I'm new to python and am having trouble working out how to combine these two expressions.



      def FindLabel ( [road_name1] ):
      S = [road_name1]
      S = S.title()
      return S

      def FindLabel ( [road_name1] ):
      if str([road_name1]) == 'LOOKOUT ROAD':
      return "<CLR red='0' blue='0' green='0'><FNT size = '22'>" + [road_name1] + "</FNT></CLR>"
      else:
      return "<CLR red='128' blue='128' green='128'><FNT size = '14'>" + [road_name1] + "</FNT></CLR>"


      Your help with this would be greatly appreciated.
      Thanks,
      Amanda









      share







      New contributor




      Amanda.B is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      Currently Using ArcGIS Pro 2.3.2 and Python



      I am currently trying to label Road names, which are all uppercase in the database. I'm unable to edit the database but would like to Capitalise the road names and pick out one street to change the font and colour for the road name.



      I'm new to python and am having trouble working out how to combine these two expressions.



      def FindLabel ( [road_name1] ):
      S = [road_name1]
      S = S.title()
      return S

      def FindLabel ( [road_name1] ):
      if str([road_name1]) == 'LOOKOUT ROAD':
      return "<CLR red='0' blue='0' green='0'><FNT size = '22'>" + [road_name1] + "</FNT></CLR>"
      else:
      return "<CLR red='128' blue='128' green='128'><FNT size = '14'>" + [road_name1] + "</FNT></CLR>"


      Your help with this would be greatly appreciated.
      Thanks,
      Amanda







      python labeling arcgis-pro





      share







      New contributor




      Amanda.B is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share







      New contributor




      Amanda.B is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share






      New contributor




      Amanda.B is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 1 min ago









      Amanda.BAmanda.B

      11




      11




      New contributor




      Amanda.B is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Amanda.B is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Amanda.B is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "79"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          Amanda.B is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f320901%2flabel-expression-in-arcpro-capitalising-and-changing-font-colour-in-python%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Amanda.B is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          Amanda.B is a new contributor. Be nice, and check out our Code of Conduct.













          Amanda.B is a new contributor. Be nice, and check out our Code of Conduct.












          Amanda.B is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f320901%2flabel-expression-in-arcpro-capitalising-and-changing-font-colour-in-python%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Щит и меч (фильм) Содержание Названия серий | Сюжет |...

          is 'sed' thread safeWhat should someone know about using Python scripts in the shell?Nexenta bash script uses...

          Meter-Bus Содержание Параметры шины | Стандартизация |...