Autodesk.Revit.DB.FamilySource
是 Revit API 中用于表示家族来源的类。 家族来源可以是文件、库或云存储。
string
string
string
string
描述:返回本地副本的路径,如果家族源是云存储,则从云获取并且将其保存到本地。
返回值类型:string
描述:确定家族源是否是云存储。
返回值类型:bool
描述:将家族源路径转换为云存储路径。
返回值类型:string
// 新建一个家族来源
FamilySource source = new FamilySource();
source.Path = @"C:\Families\MyFamily.rfa";
source.LibraryName = "MyLibrary";
source.LibraryPath = @"C:\Libraries\MyLibrary.rfa";
// 判断家族源是否是云存储
bool isCloudFile = source.IsCloudFile();
// 将家族源路径转换为云存储路径
string cloudPath = source.ToCloudPath();
// 获取本地副本的路径
string localFilePath = source.GetLocalFilePath();
Autodesk.Revit.DB.FamilySource
类提供了一种方便的方法来表示 Revit 中的家族来源,可以是文件、库或云存储。 通过使用 FamilySource
类,开发人员可以轻松地访问家族的本地副本,还可以将路径转换为云存储路径。