How can I use a remap as model parameter in a submodel in Model Builder ?

3241
13
Jump to solution
09-02-2016 08:36 AM
JanWouters
New Contributor II

Hello,

I've encountered a problem when I want to use a remap as a model parameter in model builder.

I use in a model a reclassification tool and I've set a remap as model parameter with some default values in a submodel. When I run this submodel separately everything goes well. The screen displays the table with default values which I can edit.

When I want to use this model as a submodel, I get an empty table which is impossible to edit. 

I've added an attachment with some more details.

Has someone a solution for this ?

Many thanks in advance !

Regards,

Jan

0 Kudos
1 Solution

Accepted Solutions
DuncanHornby
MVP Notable Contributor

When I open the tool I first get this:

Inital screen

 Then I select workspace:

Remap fills in as expected

As you can see the remap autocompletes and is freely editable. That's it! Nothing more. It sounds like a possible bug in version 10.0. ESRI don't seem to release patches for older versions, so you may need to upgrade (if you can) otherwise you'll just have to accept the limitations...

View solution in original post

0 Kudos
13 Replies
JanWouters
New Contributor II

Something forgotten to ask:

Can it be a kind of bug ? So yes, does someone know a workaround ? So no, is there a way to get an editable remap-table as model parameter in the main model?

Is my question clear enough or am i talking chinese ;-), then I'll try to explain it better ?

Many thanks for your opinion !

Jan

0 Kudos
DanPatterson_Retired
MVP Emeritus

Saw this Jan.  You lose me a submodel.   I guess you have ruled out moving your model to python by exporting it then putting the bits together there?  Far easier to control inputs, outputs and connections in a python tools (there are two incarnations, one is dead simple).

Having posted, perhaps it will raise the challenge to someone else... however, they would be guessing at what your model looks like and be unable to identify where you have missed specifying a parameter of some other issue.   A screen grab would go a long way

0 Kudos
JanWouters
New Contributor II

Thanks Dan for your effort to in my problem to pore upon my problem! In python (I'm a beginner in this matter and in Modelbuilder) I encounter the same problem: if I set a parameter in the script (Properties>Parameter): Data type = Remap, I've the same problem: I get an empty, uneditable reclassification table.

A little recapitulation to make my problem more clear:

I've a good working (sub)model with a reclassification as model parameter. I can edit this remap-table.

Here a screenshot of this (sub)model (the model is attached) and the startup-screen with the remap-table.

 

When I want to run this model as a submodel, I can't get an editable reclassification table any more, but only get an ineditable table. 

Here a screenshot of the main model (the model is attached) and a screen shot of the ineditable table.

I don't know what I can do to avoid this problem.

Kind regards !

Jan

DuncanHornby
MVP Notable Contributor

The input raster to the reclassify tool in your sub-model is exposed as a parameter and you expose that again in your master model so you can see it in the tool interface. But you have already pre-populated that, I know this as it's blue in your screen shot. Try removing the value from this parameter then run the tool, so you have to select the workspace, it should then populate the remap section and allow you to edit it. That worked for me.

0 Kudos
JanWouters
New Contributor II

Hi Duncan,

Many thanks for your help !

Unfortunately your solution doesn't seem to work for me. 

The model parameter with the raster was indeed pre-populated. Removing this value (in the main and in the submodel), and selecting a geodatabase (with several rasters) didn't make the remap section editable for me. May be am I looking over something ? Can you give me perhaps an example that works for you ?

Thanks !!

0 Kudos
DuncanHornby
MVP Notable Contributor

Attached is a demo 10.3 toolbox, when you select the workspace the remap section populates and you can edit it.

0 Kudos
JanWouters
New Contributor II

Hi Duncan,

Really thanks again for your support !

Is it possible that the toolbox is empty ? I don't see anything in it.

greetings,

Jan

2016-09-28 13:32 GMT+02:00 Duncan Hornby <geonet@esri.com>:

GeoNet <https://community.esri.com/?et=watches.email.thread>

Re: How can I use a remap as model parameter in a submodel in Model

Builder ?

reply from Duncan Hornby

<https://community.esri.com/people/Hornbydd?et=watches.email.thread> in *Model

Builder* - View the full discussion

<https://community.esri.com/message/637577-re-how-can-i-use-a-remap-as-model-parameter-in-a-submodel-in-model-builder?commentID=637577&et=watches.email.thread#comment-637577>

0 Kudos
DuncanHornby
MVP Notable Contributor

What version of ArcMap are you using?

0 Kudos
JanWouters
New Contributor II

ArcMap 10.0 (Build 4000)

0 Kudos