Revit二次开发中加载用到几个函数
Revit API的Document类提供了5个重载函数LoadFamily来加载族。用法和参数各不相同,其中一些还不太合乎常规习惯,特总结于此。
LoadFamily(String)
Loads an entire family and all its types/symbols into the document.
加载String参数指向的外部族及其所有类型到当前的document(注:调用此方法的document即可以是项目文档也可以是族文档)。
LoadFamily(Document)
Loads the contents of this family document into another document.
加载当前族document中的所有内容到另一个参数document。(注:调用此方法的document只能是族文档)
LoadFamily(String, Family)
Loads an entire family and all its types/symbols into the document and provides a reference to the loaded family.
加载String参数指向的外部族及其所有类型到当前的document,并且为加载成功的族对象指定一个Family参照。(注:调用此方法的document即可以是项目文档也可以是族文档)
LoadFamily(Document, IFamilyLoadOptions)
Loads the contents of this family document into another document.
加载当前族document中的所有内容到另一个参数document,同时调用IFamilyLoadOptions对象实现的接口。(注:调用此方法的document只能是族文档)
LoadFamily(String, IFamilyLoadOptions, Family)
Loads an entire family and all its types/symbols into the document and provides a reference to the loaded family.
加载String参数指向的外部族及其所有类型到当前的document,并且为加载成功的族对象指定一个Family参照,同时调用IFamilyLoadOptions对象实现的接口。(注:调用此方法的document即可以是项目文档也可以是族文档)