Detect if project has been purged

Detect if project has been purged

Anonymous
Not applicable
534 Views
2 Replies
Message 1 of 3

Detect if project has been purged

Anonymous
Not applicable

Hello dear friends,

 

I develop a plugin in c# for Revit and i need to know if a revit project has been purged before doing my work.

My problem is to know, if there is a way to detect by code if any Revit project has been purged?

 

Have a nice day.

 

Thanks for your different answers.

0 Likes
535 Views
2 Replies
Replies (2)
Message 2 of 3

dante.van.wettum
Advocate
Advocate

If there is certain elements that you need in order for your addin to work, wouldnt it be better to just check for those elements?

I dont think there is any way to check by code if there has been a purge in the model.

0 Likes
Message 3 of 3

cwaluga
Advocate
Advocate
You could get a list of symbol ids that are available and then remove those that have instances in use. If you end up with an empty list, your document has probably been purged.
0 Likes