Model Builder Question : Create Feature, not Feature Class, with Model

08-17-2011 12:28 PM
Occasional Contributor III

My question is this... is it possible to build a Model for creating new features?
Let me explain in more depth. I have created Feature Classes (currently MDB stored soon to be SDE) for various city GIS objects (i.e., Buildings, Parking Lots, etc.). Whenever I get a new Subdivision CAD file from the developing engineer I pull it into ArcView, digitize the pieces we use (streets usually and any buildings that might be visible on the plat), then it's time to break out the editing tools.

I right click on my "Location Annotation" feature in my Table of Contents.
Edit Features -> Start Editing -> Select Template (Postal Address) -> Follow Feature -> Enter the Building/House number -> Place the text -> Then I have to enter the building number (again), prefix directional, street name, street type, suffix directional, and the apartment/office/etc (if there is one).

What I am envisioning is this...
Surely there is a way to develop a model that would let me enter the address as one field:
1234 E Somewhere St S

It would break it up into the correct pieces and place those strings in their respective fields of the Annotation Feature class, and ask me if there is another address on that street to enter which would mean I only have to enter the building number because the other pieces are already sitting in memory...

Is this a dream or is it just fantasy?

Trying to Automate a process that whoever is in my position will be doing for as long as we have ESRI... Anyone have an answer for me?

I figured out (with VB) how to do the breaking things apart.. but I still can't get Model Builder to take an input of text (or fields) then wait for me to click on the screen and add a new point feature and populate the feature from, say, an Excel file...

I have an excel sheet loaded with address information.

The dream Model here would do the following:
1.Ask me what Excel file to open
2.Open target Excel sheet
3.Iterate through list of addresses (rows)
4.As it hits an address (row), generate an XYZ feature class (point) and ask me to click to place it
5.Populate the newly placed feature class with specific fields from the Excel sheet

Is this possible?
0 Kudos
4 Replies
Esri Regular Contributor
Just a clue:
Lets tackle this two part problem one at a time :

  1. You entering address and the model splitting the address into 1/2/3/4 parts and adding them to a field

  2. The model remembering a part of the old address and asking you if you want to add another on the same street.

Try this:

  • Create a model

  • Create a string variable. Rename this "Address".

  • Make it a Model Parameter. This one will let you enter the address from the model tool dialog and you wont have to open the model each time.

  • Now add Calculate value tool.

  • Rename the output of the Calculate Value tool to "HouseNumber"

  • Pass "Address" as inline variable substitution in the expression ("%Address%") (Click on link and read help and check the attached image)

  • Now use Python method (.split) to split the string and get each item of the list. (check attached image).

  • Now Add Field and Calculate Field.

  • In Calculate Field use the output of the Calculate field tool as inline variable (%HouseNumber%) in the Expression parameter.

  • Add a precondition from the output of Calculate Value tool to the Add Field tool.

  • Repeat adding and calculating for other parts of the string address by changing the value returned [0]/[1]/[2]

  • Use this process in in tools based on your workflow.

0 Kudos
Occasional Contributor III
Just a clue:
Lets tackle this two part problem one at a time :

Alright... I can't even begin to say thank you enough. That was excellent. I actually have hacked together an extremely UNELEGANT VBScripted Model to do this already. I don't use any Model Parameters... it's all VB Code (I've got TONS of VB experience)... and it's the clunkiest Model I can imagine. I will HAVE to rewrite it using the information you have given me. Thank you again.

I knew that I didn't explain it very well. So let me try again on the second part.

I have put together an Excel Spreadsheet that let's me input new subdivisions. I create a new row for each lot, I put in all the necessary data into the correc fields for each lot. It generates both a complete address for each lot AND a unique temporary Parcel number.

We are using temporary parcel numbers because it is the Tax Assessors office who assigns Permanent parcel numbers. However, in my office at the City Permit Office, I have to assign permits to these new lots before they go through the Permanent parcel number step at the assessors office. So I have to generate temporary parcel numbers now so we can run permits on these lots.

Anyway, I put together the excel sheet because it generates a unique parcel number for each lot and separates out all the address pieces.

Then I have to go into ArcView and create a polygon feature called "Temporary Parcels" and populate the address, parcel number, the address invidividual fields (house number, street name, etc), and I have to do this for each one.

I was HOPING... that I could build a model that when I ran the model it would do the following:

  1. Ask me to select the Excel File -> Worksheet Name

  2. Open that file and recognize the header row at the top

  3. Start with the first row

  4. Select that row and prompt me to click on screen somewhere

  5. Create a polygon in the Temporary Parcel Feature Class at the location of my click

  6. Fill in the fields of the Temporary Parcel Feature Class from the row it was on

  7. Goto next row (Start Over At #4)

This would make creating these in ArcView a thousand times easier.
0 Kudos
Esri Regular Contributor
Hello bokeefe,

I see your problem. I don't have a ready solution for you, but I do have some suggestions for your consideration.

This is what I would do:

1. Create a model.

2. Use Table to Table tool to convert the excel sheet to dbf table in ArcMap.

3. Expose the Input parameter of the Table To Table tool and make it a model parameter (This would allow you to enter the sheet from the model tool dialog). Read help.

4. I would create a polygon feature class - using the Create Fishnet tool before hand and give each polygon a unique ID - 1,2,3.... using Add Field, Calculate Field.

5. I would give the records in my table (same table i brought from excel) same unique ID 1,2,3 (I am assuming that when we join the table to a polygon, the location of the polygon doesn't matter till this point. So, any record with unique id 1 of table getting joined to polygon with id 1 wouldn't matter with respect to its location). This part is necessary to avoid repetitive clicks from your end to create a polygon and then running the model.

6. Then just use Join Field tool and join them based on the Unique ID field that you created.

Is it necessary for you to click at a particular location to create the polygon?
(There is a data type called Feature Set that will let you draw the polygon interactively. You can then use Copy Features tool to copy that polygon to a new dataset and then join.)

Hope this helps.
0 Kudos
Occasional Contributor III
Ok. This creates the table.
However, I want it to ASK me to select the table... right now it's got: 'Hyde Park at Tulsa Hills$'

How do I get it to prompt me for the subdivision?
I have this one Excel sheet and I will be generating new Worksheets inside of it for each new Subdivision. Right now the model points to Hyde Park at Tulsa Hills, what steps are required to set it up to ASK me...? I set that to a Model Parameter, but when I run it it just uses the one entered already. If I double click on that variable and clear out the URL to the worksheet in Excel I get this error when I try to run the model: "None of the processes are ready to run."

BTW. I REALLY appreciate you giving me these tips. I have been building models to get used to Model Builder for a week or so now, but getting the Model Builder to prompt me to enter something is not clearly described in anything I can find.

Here is the model I used to create the table:
0 Kudos