更新
This commit is contained in:
162
Revit-API/View.md
Normal file
162
Revit-API/View.md
Normal file
@@ -0,0 +1,162 @@
|
||||
## View
|
||||
|
||||
### AddFilter(ElementId id)
|
||||
|
||||
- 添加一个过滤器
|
||||
|
||||
### ApplyViewTemplateParameters(View view)
|
||||
|
||||
- 应用传入View的视图模板
|
||||
|
||||
### ChangeTypeId(ElementId id)
|
||||
|
||||
- 改变视图Type
|
||||
|
||||
### ConvertTemporaryHideIsolateToPermanent()
|
||||
|
||||
- 所有临时隐藏的构件改为永久隐藏
|
||||
也就是眼镜按钮的将临时隐藏/隔离应用到视图
|
||||
|
||||
### CreatedPhaseId
|
||||
|
||||
- 获得视图创建时的ID
|
||||
|
||||
### CropBox
|
||||
|
||||
- 裁剪框
|
||||
|
||||
- BoundBox
|
||||
|
||||
### CropBoxActive
|
||||
|
||||
- 激活裁剪框
|
||||
|
||||
- UIDocument uidoc = commandData.Application.ActiveUIDocument;
|
||||
Document doc = uidoc.Document;
|
||||
View view = doc.ActiveView;
|
||||
view.CropBoxActive = true;
|
||||
|
||||
### CropBoxVisible
|
||||
|
||||
- 裁剪框可见性
|
||||
|
||||
- UIDocument uidoc = commandData.Application.ActiveUIDocument;
|
||||
Document doc = uidoc.Document;
|
||||
View view = doc.ActiveView;
|
||||
view.CropBoxActive = true;
|
||||
view.CropBoxVisible = true;
|
||||
|
||||
### DemolishedPhaseId
|
||||
|
||||
- 被拆除时Phase的ID
|
||||
|
||||
### DesignOption
|
||||
|
||||
### DetailLevel
|
||||
|
||||
- 模型的显示精度
|
||||
|
||||
- UIDocument uidoc = commandData.Application.ActiveUIDocument;
|
||||
Document doc = uidoc.Document;
|
||||
View view = doc.ActiveView;
|
||||
using(Transaction tr = new Transaction(doc))
|
||||
{
|
||||
tr.Start("AS");
|
||||
//ViewDetailLevel.Fine 精细
|
||||
//ViewDetailLevel.Medium 中等
|
||||
//ViewDetailLevel.Coarse 粗略
|
||||
view.DetailLevel = ViewDetailLevel.Fine;
|
||||
|
||||
tr.Commit();
|
||||
|
||||
}
|
||||
|
||||
### DisableTemporaryViewMode(TemporaryViewModel model)
|
||||
|
||||
- 取消模型的临时隐藏
|
||||
|
||||
### Discipline
|
||||
|
||||
- 视图的专业,枚举类
|
||||
|
||||
### DisplayStyle
|
||||
|
||||
- 枚举类,显示样式
|
||||
|
||||
### Duplicate
|
||||
|
||||
- 视图,右键,的复制视图功能
|
||||
|
||||
### EnableRevealHiddenMode()
|
||||
|
||||
- 显示隐藏图元 灯泡按钮
|
||||
|
||||
### EnableTemporaryViewPropertiesMode
|
||||
|
||||
### GenLevel()
|
||||
|
||||
- 获得视图的相关标高
|
||||
|
||||
### Get/SETBackground()
|
||||
|
||||
- 获得/设置背景
|
||||
|
||||
### Get/SetCategoryOverrides(ElementId categoryId)
|
||||
|
||||
- 获得/设置一个族类别的覆盖样式
|
||||
|
||||
### GetCropRegionShapeManager()
|
||||
|
||||
- 获得用于管理View剪切框的对象
|
||||
|
||||
- ViewCropRegionShapeManager
|
||||
|
||||
### Get/SetElementOverrides(ElementId id)
|
||||
|
||||
- 获得/设置一个图元的覆盖样式 填色按钮
|
||||
|
||||
- OverrideGraphicSetting
|
||||
|
||||
### Get/SetFilterOverrides(ElementId id)
|
||||
|
||||
- 获得过滤器的覆盖图元
|
||||
|
||||
- UIDocument uidoc = commandData.Application.ActiveUIDocument;
|
||||
Document doc = uidoc.Document;
|
||||
Selection selection = uidoc.Selection;
|
||||
Reference r = selection.PickObject(ObjectType.Element);
|
||||
Element element = doc.GetElement(r);
|
||||
|
||||
|
||||
View view = doc.ActiveView;
|
||||
OverrideGraphicSettings ogs = new OverrideGraphicSettings();
|
||||
Color color = new Color(255, 0, 0);
|
||||
ogs.SetProjectionFillColor(color);
|
||||
ogs.SetProjectionFillPatternId(new ElementId(4));
|
||||
|
||||
//将选择的对象的图元样式改为红色实体,着色模式观看
|
||||
Transaction transaction = new Transaction(doc, "sss");
|
||||
transaction.Start();
|
||||
view.SetElementOverrides(element.Id, ogs);
|
||||
|
||||
transaction.Commit();
|
||||
|
||||
### GetFilters()
|
||||
|
||||
- 获得视图所有的过滤器
|
||||
|
||||
### GetPointCloudOverrides()
|
||||
|
||||
### GetReferenceCallouts()
|
||||
|
||||
### GetReferenceElevations()
|
||||
|
||||
- 获得海拔参照
|
||||
|
||||
### GetReferenceSections()
|
||||
|
||||
- 获得所有剖面框的参照
|
||||
|
||||
### GetVisibility(Category category)
|
||||
|
||||
- 是否有改族类型图元可见
|
||||
Reference in New Issue
Block a user