Skip to main content

Is this possible?

I would like to create a self service map generator. There will be basically 2 paths that the user can go, interior or exterior maps, and features (door points, fire alarms, bike racks, etc) can be chosen to be turned on and shown in each map. This data all lives in an ever evolving SDE. And my idea is that all the parameters the user picks will be building an ArcPy script that is manipulating an ArcPro project.

I’m laying out the base plan now, and would like to gather some ideas/input before starting off.

Here’s an example of what I want this service to do, and my initial thoughts of going about it:

Basically the user selections from the parameters will build an ArcPy script

  • I will have 2 ArcPro Map projects, one for Interior, one for Exterior
    • The user will select if they’d like to see the interior/exterior.
      • If it’s interior; the interior ArcPro project has a map series created from every floor of every building from the “floor” layer (field called bldgFlr). Therefore when the user selects a specific bldFlr, the ArcPy script will generate a PDF of only that specific building floor.
      • If its exterior; the exterior ArcPro project will have a basemap, and the extents of the mapframe will be set by a polygon in the buildingExtents layer.
  • Then there will be a parameter the user will then be able to pick from a big list of different layers on Both ArcPro projects (fire alarms, door points, trees, etc), and multiple can be shown
    • The layers on the map are turned off by default. When the user selects the layer, there will be an ArcPy command to turn the layer on, therefore the chosen layers will be in the exported PDF map.
  • Then the user can paste a file path as to where they’d like their map to output and their desired file name.

 

Is this something that’s possible?

My biggest question is how to set up parameters where there is a drop down list of every unique attribute in a field (for the building floor, or building user parameter selection).

Then the next biggest question is getting the ArcPy script formatting to output correctly when building the script from all the separate parameters.

 

Thanks for any direction/ideas that you all might have!

Hi, @schulte.a. I appreciate your patience.

Yep! It's definitely doable in FME. I can give you a basic idea of how I think this could work out.

  • I will have 2 ArcPro Map projects, one for Interior, one for Exterior
    • The user will select if they’d like to see the interior/exterior.
      • If it’s interior; the interior ArcPro project has a map series created from every floor of every building from the “floor” layer (field called bldgFlr). Therefore when the user selects a specific bldFlr, the ArcPy script will generate a PDF of only that specific building floor.
      • If its exterior; the exterior ArcPro project will have a basemap, and the extents of the mapframe will be set by a polygon in the buildingExtents layer.

 

You can easily do these steps by using user parameters and parameter conditionals.

  1. You would create a choice box parameter which includes the choices of either Interior or Exterior.
  2. You would create two more choice box parameters, one for interior and one for exterior.
  3. Modify the interior and exterior choice box parameters and enable Conditional Visibility (link above on how to use it) and set it to If (step 1 parameter name) Is (Interior) Then (Enable) Else (Hide). Vise versa for Exterior.
  4. To populate the choices you would navigate to the Import drop-down, select your dataset (i.e., SDE), and use ‘Attribute Values’ for the Import Mode selection.
  5. The same can be done with the Exterior parameter, but this time, it will hold an attribute rather than the user selecting it (i.e., polygon in the buildingExtents layer).

 

  • Then there will be a parameter the user will then be able to pick from a big list of different layers on Both ArcPro projects (fire alarms, door points, trees, etc), and multiple can be shown
    • The layers on the map are turned off by default. When the user selects the layer, there will be an ArcPy command to turn the layer on, therefore the chosen layers will be in the exported PDF map.

 

This can be done with user parameters. Also there is an option for Scripted Parameters.

 

  • Then the user can paste a file path as to where they’d like their map to output and their desired file name.

 

This can also be done with user parameters.

 

My biggest question is how to set up parameters where there is a drop down list of every unique attribute in a field (for the building floor, or building user parameter selection).

 

The user parameters part mentioned earlier can definitely address the first part. Now, for the second part, I'm curious to know if you have duplicate values where you mentioned every unique attribute in a field (e.g., floor 1 is shown 10 times)? If that's the case, the best approach would be to preprocess the data and then follow the steps I mentioned earlier for importing it.

 

Then the next biggest question is getting the ArcPy script formatting to output correctly when building the script from all the separate parameters.

 

I recommend taking a look at this article as well as the one on Scripted Parameters (link above).

 

Let me know if you need any further clarification! Happy to help 🙂.


I actually created it! It was way easier than I anticipated. I watched a video on YouTube about user parameters. The power of User parameters + TestFilters is huge! I was able to incorporate all the functionality I wanted. Simply incredible. 

 

I didn’t use scripted parameters, I put my arcpy script in an attributemanager, then had the userparameters values in the script for to perform the layer toggling, but thank you for telling me about scripted parameters, I’ll start learning about those!


Hi, @schulte.a.

Glad to hear that you worked it out 🙂! Indeed it is! Nice, no problem! Scripted parameters are helpful in some use-cases.


Reply