Handling warning in dynamo python

Hi,
I’m getting this warning window while convert .sat to .rfa. How can I handle this warning automatically using dynamo python.
I have also referred IFailurePreprocessor, but couldn’t use it before the warning message doesn’t falls under that category. And checked other failure messages as but couldn’t find one.
can anyone help me with this?

image

Does the warning get suppressed with the FamilyType.ByGeometry node? If so you can look into that code on the Dynamo for Revit GitHub.

If not, your SAT may be invalid for import and you’ll have to address that first.

@jacob.small, the entire conversion is done with the python programming, dynamo nodes are not used

But since there is a possible issue with one of the sat files you’ll need to test if that file is valid for Revit use by using another method.

I have manually converted the file, it didn’t throw any error.

Do I have to check it in any other things?

Can you post the sat, a Revit file to import into, and your dynamo graph?

Hi @jacob.small, please find the revit file. Kindly have a look and let me know.
km160356h01.sat (77.5 KB)
SATImport_py_final.dyn (19.3 KB)

1 Like

Hi @jacob.small, any luck on this?

Had a buy day and a half so I haven’t opened it yet - will be trying to get to it later today.

Hi @jacob.small ,any luck?

Played around with it some a few days ago, and again a bit this morning. Sadly no luck - the file appears to be somewhat invalid as multiple applications fail to import it (including Revit and Dynamo).
image

While Revit’s UI will force it’s way past the issue, it does so by discarding some of the data; this isn’t something I’d be comfortable suppressing in bulk as eventually you’ll get garbage which will fail to produce the desired outcome, but with the UI the expectation is that the user will see the warning and review the content to ensure it meets their needs.

I suggest going back to the authoring application and cleaning up the geometry.

As far as the warning, we could look to take the action of accepting the error (hitting the ok) programmatically, but this will cancel the import and you won’t know something failed.

@jacob.small, thanks for the explanation and checking on it. How to accept the error programmatically?

When I tried to hit ‘OK’ for the program during the run, it got imported actually. By doing programmatically this will not work the same way?

Correct; it’s a different scenario when the import is via the API.

Would you really want to force the application to continue without the warning, knowing that you’ll have an RFA saved somewhere with no geometry in it?

Yes, just want to give it a try. I can try something for the final reporting.

Hi @jacob.small, just a thought you have mentioned that the file will be saved without geometry in it. Instead of that, if there is any warning during the conversion can we skip that file and get that the file name separately.