|
POST
|
Yes this is a script which I will have to run occasionally. I still have ArcMap 10.7 on my computer so I'm not completely devoid of using my old way of running the script in VB. I'm just slowly trying to learn how to do it in Python in case in the future I lose my connection with ArcMap and have to rely on using ArcGIS Pro. Hopefully I never have to get that complex in scripting. That's a clever way of using other programs to figure out how to accomplish a complex task! Cheers!
... View more
10-25-2019
08:34 AM
|
0
|
0
|
1263
|
|
POST
|
Then I just need to learn how to enter it into the prelogic part of the module. Thank you for helping me figure out this issue Robert!
... View more
10-25-2019
08:04 AM
|
1
|
2
|
14970
|
|
POST
|
# Process: Calculate Field (2) arcpy.CalculateField_management(clines__5_, "LABEL", "RTRIM([PRE_DIR]) & \" \" & LTRIM(RTRIM([STR_NAME])) & \" \" & [SUF_FIX]", "VB", "IF RTRIM([PRE_DIR]) = \" \" then\\n MyLabel = LTRIM([STR_NAME]) & \" \" & [SUF_FIX]\\nelse\\n
... View more
10-25-2019
07:58 AM
|
0
|
4
|
14970
|
|
POST
|
I know I have the syntax wrong because I am very unfamiliar with python syntax. I have just been looking at python examples on the internet and doing what I thought would work since what I had in VB works. Here is a screenshot of the Calculate Field module I have in python.
... View more
10-25-2019
07:33 AM
|
1
|
6
|
14970
|
|
POST
|
I know I marked your response as correct and it may be correct but I'm still getting an error when trying to convert my if statement to python. I tried this but it isn't working If (!PRE_DIR!).RTrim() = " " print(!STR_NAM!) + " " + (!SUF_FIX!) else print(!PRE_DIR!).RTrim() + " " + LTrim (RTrim(!STR_NAME!)) + " " + Return !SUF_FIX! Any help would be appreciated! Thanks
... View more
10-25-2019
07:15 AM
|
1
|
8
|
14970
|
|
POST
|
Thanks Robert! I knew there was an easy way to do this. HAHA!
... View more
10-24-2019
08:36 AM
|
1
|
0
|
14970
|
|
POST
|
I had some VB code in one of my Calculate Field modules in modelbuilder. I am trying to convert it to Python Can anybody help me with this? IF RTRIM([PRE_DIR]) = " " then MyLabel = LTRIM([STR_NAME]) & " " & [SUF_FIX] else MyLabel = RTRIM([PRE_DIR]) & " " & LTRIM(RTRIM([STR_NAME])) & " " & [SUF_FIX] end If Thanks
... View more
10-24-2019
08:29 AM
|
0
|
11
|
16879
|
|
POST
|
Thanks for the reply Josh! I would have embedded the screenshots in the post if I knew how.
... View more
10-24-2019
08:26 AM
|
0
|
1
|
2080
|
|
POST
|
Hi all, I am trying to concatenate 3 fields together in an attribute table and Python is only calculating the first field listed in my script. I am trying to do the concatenation in the LABEL field. All I see is the values for DIRPRE
... View more
10-23-2019
11:14 AM
|
0
|
3
|
2210
|
|
POST
|
Excuse my ignorance on this but I am python illiterate. I am working in ArcGIS Pro and I have built a model to create an new feature class and populate the attribute table for that feature class with values from another attribute table. I built the model in ArcMap and it works fine in ArcMap, however, I have ArcGIS Pro now and one of the fields in the attribute table is empty. I know how to copy empty fields in VB but I don't in Python. Can someone help me on how to copy empty fields in Python? Thanks,
... View more
10-23-2019
07:56 AM
|
0
|
0
|
687
|
|
POST
|
I am running the model now as I type with my address feature as a feature class and it seems like it is working. I still see the address layer in the map when I didn't when it was a shapefile. Thank you!
... View more
10-11-2019
08:14 AM
|
0
|
0
|
495
|
|
POST
|
Thanks Robert! That's what I'm trying to be. 'Exceptionally basic'
... View more
10-11-2019
08:02 AM
|
0
|
0
|
2830
|
|
POST
|
That's what I am coming try right now Thanks, Scott
... View more
10-11-2019
07:47 AM
|
0
|
0
|
2830
|
|
POST
|
Yes I have preconditions set to the last variable in the first step. I think the reason the model stops is because the first step takes the shapefile out the map while it is running and the second step won't start unless the shapefile is in the map. I am trying to get the model to run through each step on its own without me having to babysit it and put the layer back in the map after each step
... View more
10-11-2019
07:23 AM
|
0
|
3
|
2830
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-02-2025 07:41 AM | |
| 1 | 06-27-2023 11:13 AM | |
| 1 | 04-03-2023 10:14 AM | |
| 1 | 07-14-2023 08:09 AM | |
| 1 | 10-04-2024 06:41 AM |
| Online Status |
Offline
|
| Date Last Visited |
05-13-2026
12:56 PM
|