4

I am building a Model in ArcGIS Desktop 10.8. At some point in my model, I am dealing with Line feature classes. I turn them into Polygon feature classes, and then I merge them into one feature class.

The source of my problem is, that some of the inputs might be empty. If I run the Feature To Polygon tool with these inputs, it gives me the following error message:

Error executing function. The geometry is not M-aware Failed to execute

I tried to solve the problem, based on this thread: Geometry is not M-Aware?. It didn't help. I am working in a geodatabase, and the M-aware option is turned off in the environmental settings.

I thought that preconditioning would work, so I tried (as you can see in the 3rd and 4th row of the attached image). The problem here is that it won't run the Feature To Polygon tool indeed, but it won't run anything after this tool either. So it won't eventually merge the other, not empty feature classes either.

Is there a way to skip some steps, based on a condition, and continue the running from an other point?

In my case, can I skip the Feature To Polygon and the Calculate Field tools if my feature class is empty, but then run the Merge tool with the other, not empty feature classes?

enter image description here

3
  • 1
    This should get you on the right path : desktop.arcgis.com/en/arcmap/latest/analyze/modelbuilder/…
    – J.R
    Commented Jan 4, 2021 at 11:22
  • I did not mention in my question, but I also wrote a python script to tell if a FC is empty. The problem is the same. If the FC is empty, it won't run the tools on the not empty brcanch, and since it's one of the inputs for Merge, it won't run either. I just get a "All the inputs are not current" message for every FC that were empty.
    – 588chm
    Commented Jan 4, 2021 at 12:02
  • 2
    Please use the edit button beneath your question to revise it with any additional information.
    – PolyGeo
    Commented Jan 4, 2021 at 12:57

2 Answers 2

4

I have just spoofed up this model to simulate what you are doing and it all works fine for me! I'm using ArcMap 10.6.1

The Merge takes 3 datasets, one with nothing in it and various M-aware levels, everything merges as expected.

Model

This would indicate the source of the problem lies elsewhere. Modelbuilder often seems to hang on to old environment settings and in a few cases rebuilding a model from scratch seems to fix things. I would try a new model with just a couple of outputs, one you know is creating an empty dataset and feed them into the merge tool. For me everything merged empty or not, M-aware or not....

1
  • 2
    You are right! I tried the same thing and it works! It seems like my problem is in the part where I convert my line feature class to polygon feature class. I will try to build it up again and see what will happen.
    – 588chm
    Commented Jan 5, 2021 at 6:37
-1

Use Data Exists...Look at the following link!! https://pro.arcgis.com/en/pro-app/latest/tool-reference/modelbuilder-toolbox/examples-of-using-logical-tools-in-modelbuilder.htm#GUID-C0E9F998-C1DE-4D52-9FCE-13543FBC0FCB

3
  • Thank you, but unfortunately it's an ArcGIS Pro tool, and I only have ArcGIS Desktop. Now I am aware of the Exists arcpy function, but then my problem remains the same, since the Merge tool takes multiple inputs.
    – 588chm
    Commented Jan 4, 2021 at 12:08
  • 1
    workaround in the modelbuilder count the feature.and if count is greater than 0 then move ahead count with if then else logic..
    – Rpandia31
    Commented Jan 4, 2021 at 12:14
  • it is there in arcmap
    – Rpandia31
    Commented Jan 4, 2021 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.