Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 66672

get failure type

$
0
0

Hi guys,

 

What I want:

if Revit throws a failure to catch that failure and return what kind of failure that is (so I can delete the warning accordingly)

 

 

Example:

I set a Mark to two elements. Revit throws 'Elements have duplicate "Mark" values'.

I want to know what api failure that corresponds to.

 

The answer in this case is: 
BuiltInFailures.GeneralFailures.DuplicateValue

 

But I often struggle which failure I need. So I would like to get "BuiltInFailures.GeneralFailures.DuplicateValue"  as string. Is this possible?

 


Viewing all articles
Browse latest Browse all 66672

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>