How to determine what kind of document is open?

How to determine what kind of document is open?

CollinJoseph0258
Enthusiast Enthusiast
482 Views
3 Replies
Message 1 of 4

How to determine what kind of document is open?

CollinJoseph0258
Enthusiast
Enthusiast

Hello,

 

I am trying to distinguish between different types of documents (e.g. is the current document a project (.rvt) or a family (.rfa)).

 

What is the most efficient way to do this?

 

0 Likes
Accepted solutions (1)
483 Views
3 Replies
Replies (3)
Message 2 of 4

sragan
Collaborator
Collaborator
Accepted solution

doc.IsFamilyDocument

 

 

Message 3 of 4

CollinJoseph0258
Enthusiast
Enthusiast

Thanks! Totally missed that while browsing the docs.

0 Likes
Message 4 of 4

sragan
Collaborator
Collaborator

Yes, it returns true if the document is a family document, and false otherwise.

 

You can also use:

 

doc.PathName and check to see if there is a rfa or rvt on the end of the string.