Hi there, I am trying to create a model that will take a grid already in a layer and move it to a specified point location from another layer - like when in edit mode where one can drag an object and have it snap to a specific point. The grid would need to center over the specified point, and I have not found a good tool to input in model builder to do so. I am not sure if there is a script I should use instead (I am not fantastic at python). This does need to be done through model builder as I am trying to automate a larger process. Any help or pointers would be appreciated!
Hello
Have you looked at the "Move To" tool via the Edit tab?
https://pro.arcgis.com/en/pro-app/3.1/help/editing/move-a-feature-to-specified-location.htm
I achieved what you want to do by:
1: Select the features you wish move
Use the Select Features tool or perform an attribute query
2: On ArcGIS Pro's choose Edit tab | Features group | Modify button.
This will display the Modify Features pane.
3: Choose the Move To tool
The selected features will be displayed.
4: For Method choose Absolute.
The existing geometric central location of the selected features will be displayed.
5: Enter the new geometric centre for features by entering the X and Y values of the centre.
6: Press the Move To button.
Your features will then be moved to the new geometric centre.
7: Decide if you wish to save your changes or discard the edits.
Hopefully that will do the trick.
If you want to automate this then you could create a Task to make sure you get the steps in the right order.
many thanks ed
Hi! Thank you for responding. My understanding is that as an editing tool in the modify pane, it is not a geoprocessing tool and therefore cannot be used as a tool in ModelBuilder which is where I need to be. Automating it is an interesting idea, but again it would need to be in ModelBuilder. Maybe there is a way to import this tool into ModelBuilder I am unaware of or script it?
Hi
Many apologies for not replying sooner but I had a couple of weeks off for summer holidays.
You are quite right - the tool won't work in a model (and my mistake for suggesting it as i thought it was a one-off process) as it is not a geoprocessing tool. The closest tool which you can use in a model is the Transform Features tool:
https://pro.arcgis.com/en/pro-app/latest/tool-reference/editing/transform-features.htm
But:
1: You need to create a Link Features file
2: An Advanced ArcGIS Pro license.
or....
You could write a Python script which uses an da.UpdateCursor in which you would need to access each feature, and for each feature get the vertices which make up that feature and add the offset value to each feature (I think...).
So not as straightforward as I'd hoped.....
many thanks ed
Hi, no worries about the late reply. I realized as well that scripting was probably my best option. da.UpdateCursor does work. Thank you for the reply!