Hexagon Geospatial
MENU

Spatial Modeler

Discuss topics with other Hexagon Geospatial Product pioneers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Frequent Contributor
Posts: 100
Registered: ‎04-03-2017

Iterate/Loop through spatial model based on integer

[ Edited ]

Hi there,

 

I see there is an iterator operator in spatial modeller which I am unsure how to use.

I have a spatial model that starts off with 1, passes that the next operator and continues the model.

I want this to increment by 1 at the end of the model then run through the model again until it hits 267.

 

How can I do this?

 

Thanks,

 

Josh

Technical Evangelist
Posts: 710
Registered: ‎10-01-2015

Re: Iterate/Loop through spatial model based on integer

Hi Josh,

 

This may depend on what you're actually trying to do 267 times, but the basic way to run an Iterator n times would be to create a Table with n rows and use that Table to control the number of iterations (and, if desired, use the values in the rows of the Table within iteration). Like this:

 

Iterator.PNG

You should also be able to find examples of using Iterators in the Spatial Modeler Tutorials articles section. Just search on Iterator.

 

Hope that helps.

 

Cheers

 

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Frequent Contributor
Posts: 100
Registered: ‎04-03-2017

Re: Iterate/Loop through spatial model based on integer

Thanks Ian,

 

I will try this.

As a workaround I created a batch file from 1 to 267 which runs the spatial model using these inputs.

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.