POST
|
I don't know man I still can't get it. It works for my other feature, but for the abandoned feature it's not working.
... View more
03-02-2017
10:43 AM
|
0
|
0
|
222
|
POST
|
This is what I've got and I'm getting an error. I've tried both expressions and both got the same error message. def FindLabel ( [NOMINALDIAMETER], [MAINMATERIAL], [ABANDONMENTDATE], [ABANDONMENTORDER] 😞 return [NOMINALDIAMETER] + " " + [MAINMATERIAL] + " " + ' '.join(filter(None, [ABANDONMENTDATE][-2:], [ABANDONMENTORDER])) def FindLabel ( [NOMINALDIAMETER], [MAINMATERIAL], [ABANDONMENTDATE], [ABANDONMENTORDER] 😞 return ' '.join(filter(None, ([NOMINALDIAMETER], [MAINMATERIAL], ([ABANDONMENTDATE][-2:]), [ABANDONMENTORDER])))
... View more
03-02-2017
09:00 AM
|
0
|
2
|
932
|
POST
|
Ok I got it to work, last question, where can I enter in [-2:] so I get the last 2 digits of the date? In red I've included what I've tried and it failed. I haven't had any formal python training so I'm trying to teach myself. I appreciate your help. def FindLabel ( [NOMINALDIAMETER], [MAINMATERIAL], [ABANDONMENTDATE], [ABANDONMENTORDER] 😞 return [NOMINALDIAMETER] + " " + [MAINMATERIAL] + " " + ' ' .join(filter(None, (([ABANDONMENTDATE][-2:]), [ABANDONMENTORDER])))
... View more
03-01-2017
01:17 PM
|
0
|
6
|
932
|
POST
|
That worked great. Now I have an additional problem, how do I include this in my overall script to annotate a feature using other fields, not just the ones above, that don't have null values. This is my entire script. Where would I add in what you sent me. def FindLabel ( [MAINSIZE], [MAINMATERIALTYPE], [SYSTEMMAOP], [INSTALLATIONDATE], [WORKORDERNUMBER], [INSERTEDMAINSIZE], [INSERTEDMAINMATERIAL] 😞 return [MAINSIZE] + " " + [MAINMATERIALTYPE] + " " + [SYSTEMMAOP] + "D" + " " + ([INSTALLATIONDATE][-2:]) + " " + [WORKORDERNUMBER] The 5 fields I'm using here all have a value. I want to add the inserted information (INSERTEDMAINSIZE and INSERTEDMAINMATERIAL) if applicable, on another line ("r\n"). Where would I put the join(filter(None.... to get my final label?
... View more
03-01-2017
12:23 PM
|
0
|
9
|
932
|
POST
|
def FindLabel ( [INSERTEDMAINSIZE], [INSERTEDMAINMATERIAL] 😞 return str([INSERTEDMAINSIZE]) + " " + str([INSERTEDMAINMATERIAL]) I'm using ArcMap 10.2. There are null values in [INSERTEDMAINSIZE] and [INSERTEDMAINMATERIAL]. Instead of labeling the Null values as "None" I don't want them to show up on the map at all. If there is a value for that features, I want that to label, just not the null values. How do I add this to the script? Thanks
... View more
03-01-2017
11:10 AM
|
0
|
11
|
2116
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|