Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
192 views
in Technique[技术] by (71.8m points)

Revit Document.itTemplate property

Trying to figure out a way to determine if a newly created, unsaved Revit file is a project or a template. the Document has a property for "isFamily" returning true or false, but none for isTemplate. Since there is no file path, I cant examine the file name and extension. Is there a way to determine if an opened, unsaved document is a project vs a template?

question from:https://stackoverflow.com/questions/65830097/revit-document-ittemplate-property

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

As far as I know, it is not possible. I can only imagine that you could check if the Path is empty and then use the Document Title to proof if it contains the default Template name prefix (something like "template*"), but of course you cannot be 100% sure that it is actually a template besides the prefix is dependent on the current Revit culture.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...