Jump to content

 
Photo

New Tool/Model

- - - - -

  • Please log in to reply
7 replies to this topic

#1
MrEmMak

MrEmMak

    Newbie

  • New Member
  • Pip
  • 2 posts
  • United States

Hi,

I want to make a model and leave a couple parameters open so it runs more like a tool where I have to set a couple parameters before it runs.

I'm running, over and over, a couple tools in a row but each time one of the parameters has to change. I know I can run the model, change the one parameter and run it again over and over. I'm curious if there is a different way I don't know of. It seems like new tools that tie other tools together would be something you can do.

#2
Hans van der Maarel

Hans van der Maarel

    CartoTalk Editor-in-Chief

  • Admin
  • PipPipPipPipPipPipPip
  • 3,835 posts
  • Gender:Male
  • Location:The Netherlands
  • Interests:Cartography, GIS, history, popular science, music.
  • Netherlands

I assume you're talking about ModelBuilder?
Hans van der Maarel - Cartotalk Editor
Red Geographics
Email: hans@redgeographics.com / Twitter: @redgeographics

#3
Laura Miles

Laura Miles

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 116 posts
  • Canada

You could use VBA? May be time-consuming to build, depending on your skill level, but depending on how often you use this tool it may be worth it. (I'm assuming you've been using ArcGIS and Model Builder)
Laura

#4
dsl

dsl

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 225 posts
  • Gender:Male
  • Location:Denver
  • United States

If you are using ArcGIS, then I would skip creating anything new in VBA. It won't be supported after 10, and even then requires a separate install. You should be able to accomplish this with Modelbuilder and Python. If you need something more, then .NET. Unfortunately, there isn't anything in between now that VBA is going away.

HTH,
David

#5
Laura Miles

Laura Miles

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 116 posts
  • Canada

If you are using ArcGIS, then I would skip creating anything new in VBA. It won't be supported after 10, and even then requires a separate install. You should be able to accomplish this with Modelbuilder and Python. If you need something more, then .NET. Unfortunately, there isn't anything in between now that VBA is going away.

HTH,
David


I've heard that VBA is going away. The GIS program I took just two years ago was very VBA-intensive. Wish they'd spent more time on Python instead!
Laura

#6
dsl

dsl

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 225 posts
  • Gender:Male
  • Location:Denver
  • United States

I've heard that VBA is going away. The GIS program I took just two years ago was very VBA-intensive. Wish they'd spent more time on Python instead!
Laura



Yeah, it's frustrating that they are getting rid of VBA, especially since there are so many scripts available. Probably how it felt when they got rid of Avenue and AML.

If you know some VBA, getting transitioned to using VB.NET shouldn't be too difficult. Or, I learned a bit of python simply by taking models and exporting them out to a python script then manipulating it. Almost each help page for each geoprocessing tool has an example python script at the bottom. Hopefully they'll just stick with something for longer than two software iterations.

#7
spg

spg

    Contributor

  • Validated Member
  • PipPip
  • 17 posts
  • New Zealand

I had great difficulty in getting modelbuilder to iterate through with two changing parameters, but if you are changing just one of the parameters you could try running it as in "batch" mode - setting the parameter(s) appropriately. If your iteration is based on something in the model itself you could set up an iteration input in modelbuilder as per http://www.esri.com/.../iteration.html

Alternatively create your model and export it to python. Then add in code to input the new parameters on each iteration. You could write it in VB.Net but python will be quicker.


Hi,

I want to make a model and leave a couple parameters open so it runs more like a tool where I have to set a couple parameters before it runs.

I'm running, over and over, a couple tools in a row but each time one of the parameters has to change. I know I can run the model, change the one parameter and run it again over and over. I'm curious if there is a different way I don't know of. It seems like new tools that tie other tools together would be something you can do.



#8
Mark Boucher

Mark Boucher

    Newbie

  • New Member
  • Pip
  • 9 posts
  • Gender:Male
  • Location:Martinez, California
  • Interests:Hydrology <br />Hydraulics<br />Watershed Analysis
  • United States

Hi,

I want to make a model and leave a couple parameters open so it runs more like a tool where I have to set a couple parameters before it runs.

I'm running, over and over, a couple tools in a row but each time one of the parameters has to change. I know I can run the model, change the one parameter and run it again over and over. I'm curious if there is a different way I don't know of. It seems like new tools that tie other tools together would be something you can do.

Try making a smaller version of the model, one or two iterations. Then export to python or some other script. View that script and once you are familiar with the pattern, copy and past that lines and change the variables.
Mark
"We may not be big, but we're slow."




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

-->