Modelbuilder- Dissolve Error- "New ArcInfo Workspace"

5678
5
06-23-2011 12:27 PM
PhyllisDavis
New Contributor II
I have a model set-up that asks for the user to input the workspace location ("Output geodatabase")...that works fanastically..

however...I get an error with the Dissolve tool.  I have the dissolve output set to: "\%Output Geodatabase"&\Dissolved" and I continually get a pop-up window the says "New ArcInfo Workspace"


I only get this error with the dissolve tool- any ideas on how to fix this???
0 Kudos
5 Replies
TylerBragg
New Contributor II
I'm not sure exactly how you have it set up, but try this and see if it works:

In modelbuilder, you can go to "Insert", "Model Only Tools", and select "Parse Path."  This tool will read your input and give you either the File Name, Path, Name, or Extension (these are defined by you). 

Put two of them in your model and make a variable from the "Input data Element" for one of them.    Then, make that a model parameter for the user to set the input Geodatabase.  Then connect that input variable to the other Parse Path tool, so you have one input going to both of them.  Set one of the tools up to read "Path" and the other to read "File."  Both outputs will be the "in-line variables" in your model.  Rename the output elements whatever you want--in this case, I would name them "Path" and "File," respectively.  I attached an example of how it should look. 

From then on, when you want to write to that geodatabase in your model, set the output path of your tool (like the dissolve) to  "%Path%\%File%\output_file_name" .  This has worked successfully for me through very complex models, even using sub-models. 

Tyler Bragg
West Virginia Property Tax Division
MichaelRock1
New Contributor III

That worked for me too!  Not sure why, but it did. Thanks Tyler!

0 Kudos
PhyllisDavis
New Contributor II
Tyler,

Awesome- worked great!! Thanks for your help!!
0 Kudos
TylerBragg
New Contributor II
Tyler,

Awesome- worked great!! Thanks for your help!!


Glad to hear it worked for you! 

Tyler
0 Kudos
DavidBrett
New Contributor III

I had the same problem with the Near Analysis tool, but in Python.

Long story short, my working gdb path was set to raw string instead of unicode:

#does not work
Working_gdb = r"E:\Data\Projects\Temp\WorkspacePy\Working.gdb\\" 
#works!
Working_gdb = u"E:\Data\Projects\Temp\WorkspacePy\Working.gdb\\" 

Assigning UNC Path to arcpy.env.workspace - Geographic Information Systems Stack Exchange