|
POST
|
Without an instantiated project, I don't know if you can use layers in this way. Running Select Layer By Location from a standalone script seems to imply you have a project session going. Using a layer as input to Copy Features is different from modifying selection status the layer. If you run Create Make Feature Layer to instantiate a layer in memory, will that layer work with select Layer by Location?
... View more
09-27-2021
10:32 PM
|
0
|
1
|
2320
|
|
POST
|
Dan, if you look at the code, @Jae_Jeon is using geodesic distance, which avoids the coordinate system issue, but something weird is happening and it appears the buffer is not the size he's looking for. On reading the help for arcpy.PointGeometry I'm wondering if what you need to use is not the default GEODESIC but, instead, GREAT_ELLIPTIC for your distance-angle method.
... View more
09-27-2021
08:31 PM
|
0
|
1
|
5399
|
|
POST
|
You would have to make sure there is an italic for that font. Try Arial. Another thing to try is Python, if you don't need to work with javascript I would eschew that "circus language", in Python you can use its excellent string manipulation functions to easily do many things with labels. I dropped a note to the help page author to fix the trailing quote issue in the help. They read feedback!
... View more
09-27-2021
06:01 PM
|
1
|
0
|
2271
|
|
BLOG
|
Isn't the competence also measured by other requirements besides simply passing tests? I'm sure there are many FE's that would not have passed through just based on excellent test scores.
... View more
09-27-2021
05:57 PM
|
1
|
0
|
5776
|
|
BLOG
|
As a long time Fed, I didn't really see the need, but now since I am an academic and doing some private sector work I'm thinking about it again, and you, Joseph, as usual, are inspirational. Your argument is sound: certification is good for the whole profession; it raises the bar and encourages excellence and continuous education, so it should be supported by all of us.
... View more
09-27-2021
04:01 PM
|
3
|
0
|
5791
|
|
POST
|
If you can build the three expressions from one input, that can be done using the Calculate Value tool. Or you can have the three expression marked as parameters and the user can specify them and run the model. Another approach is to create a variable and then use that variable directly in the SQL expressions for you select by attribute surrounded by % signs. The value is substituted in at runtime. I think we need a little more detail to understand what you need, but maybe this will help you get started.
... View more
09-24-2021
04:02 PM
|
0
|
0
|
3070
|
|
POST
|
You are saving in ArcMap format. Pro sometimes can't read ArcMap format toolboxes, and the save as function doesn't always work perfectly because of differences between ArcMap and Pro. I suggest saving it in the default (Pro) format, not in ArcMap 10.5 format. If you just want a copy of the toolbox in a new project, use copy paste, not save as.
... View more
09-24-2021
02:57 PM
|
0
|
0
|
3174
|
|
POST
|
Here's a solution that may work for you: ModelBuilder fmodel and my Calculate Value code to build your SQL expression to select the rows you want to calculate: # Calculate Value expression
make_expr(r"%input table%")
# code block
# returns either "CONDUCTORMATERIAL = 'aluminum' or
# "NEUTRALMATERIAL = 'aluminum'
def make_expr(tbl):
f1 = "conductorMaterial".upper()
f2 = "neutralMaterial".upper()
fld_list = [f.name.upper() for f in arcpy.ListFields(tbl)]
if f1 in fld_list:
fld = f1
else:
fld = f2
expr = "{} = \'aluminum\'".format(fld)
return expr
... View more
09-24-2021
02:41 PM
|
1
|
1
|
2367
|
|
POST
|
In ArcMap, the precondition route (no "If" tool as we have in Pro ModelBuilder) would be more complicated, so it may make more sense to build your select expression in Python using the Calculate Value tool with logic based on what fields are there, and pass that SQL expression to the select by attributes tool.
... View more
09-24-2021
09:37 AM
|
1
|
3
|
2382
|
|
POST
|
I do not understand well I think - how could you select on a field that is in another table? Maybe you want to add a join so both fields are available in a joined table? If the second field may or may not be there in the table you are selecting you could use preconditions to choose which select expression to use (one with the field, one without) but it's not clear to me that is your issue.
... View more
09-24-2021
08:41 AM
|
0
|
5
|
2391
|
|
POST
|
I'm assuming the picture is the model in project 1. Though it's not clear to me what "empty" means. Do you mean the boxes are gray or the tools and variables are not visible? If the latter, have you tried hitting the auto format button, or zoomed the model?
... View more
09-21-2021
01:29 PM
|
0
|
2
|
3189
|
|
POST
|
Some suggestions: On field prefixes, check out the Qualified Field Names environment setting. Check out the Join Field tool to copy a field from one table to another this may help you make more elegant output.
... View more
09-20-2021
07:02 AM
|
0
|
0
|
1194
|
|
POST
|
No, I did not suggest exporting the model, what I am suggesting is to use the Calculate Value (not Calculate Field) tool, which allows you to calculate expressions in Python. These expressions can include python code to run tools from arcpy, I gave you the parameters to use with the tool to do this. The idea is instead of running Add Global IDs in a tool like you have it, run the tool with a Python expression inside a Calculate Value tool to you can avoid the validation that is holding things up for you. You can use preconditions to make sure the table is ready to go before you run the Calculate Value, and use its output as a precondition to your Add Attribute Rules runs to make sure your Calculate Value runs first. Check out the help on Calculate Value, maybe that will help you understand what I am suggesting.
... View more
09-15-2021
04:59 PM
|
0
|
0
|
4520
|
|
POST
|
Please provide a link to this post so community members and managers can test.
... View more
09-15-2021
08:48 AM
|
0
|
0
|
1420
|
|
POST
|
Your issue is the field map on the second and later iterations does not match the input table. The field map is initialized and populated from the first iteration when the model is validated and is not refreshed on every subsequent iteration. Using the Copy Features tool is a good workaround, as that tool does not use a field map. Another solution would to build the field map on each iteration at runtime using Calculate Value with a python code, using arcpy FieldMap properties and methods. This is a lot more complicated and involves good understanding of the FieldMap arcpy object but gives you full control of the schema of the output table.
... View more
09-15-2021
07:48 AM
|
1
|
0
|
4378
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-11-2021 01:26 PM | |
| 5 | 12-10-2021 04:58 PM | |
| 1 | 02-27-2017 09:30 AM | |
| 2 | 12-04-2023 01:05 PM | |
| 1 | 04-12-2016 10:17 AM |
| Online Status |
Offline
|
| Date Last Visited |
06-19-2024
12:10 AM
|