I simply want to open the custom model's SCREEN (ModelBuilder) from .NET.
1 Answer
When your command is run inside ArcMap (should work in ArcCatalog and other applications as well):
var arcToolBoxExtension = _app.FindExtensionByName("ESRI ArcToolbox") as IArcToolboxExtension; if (arcToolBoxExtension != null) { var arcToolBox = arcToolBoxExtension.ArcToolbox; var gpTool = arcToolBox.GetToolbyNameString("MyModelName"); if (gpTool != null) arcToolBox.EditToolSource(gpTool); } Where _app is an IApplication reference, and "MyModelName" is the Name of your model. Note that the Name is different from the model's Label - you can find both in the tool's properties on the General tab as shown below:

- Thank you. Thank you. Thank you. Works perfectly! Just what I need.deskcheck1– deskcheck12010-09-28 16:53:06 +00:00Commented Sep 28, 2010 at 16:53
- Sorry for being a nitwit. But, where do I click to mark this as answered? :)deskcheck1– deskcheck12010-09-28 17:49:04 +00:00Commented Sep 28, 2010 at 17:49
- I suggest you skim over FAQ gis.stackexchange.com/faq to get to know how the site works, it will help you understand asking/answering questions and other things, like reputation, which you will find useful.Petr Krebs– Petr Krebs2010-09-28 21:57:23 +00:00Commented Sep 28, 2010 at 21:57