FamilyElementVisibility
Description:
Provides access to the visibility parameters of family elements in family document.
Provides access to the visibility parameters of family elements in family document.
Inheritance Hierarchy:
System.Object
Autodesk.Revit.DB.APIObject
Autodesk.Revit.DB.FamilyElementVisibility
System.Object
Autodesk.Revit.DB.APIObject
Autodesk.Revit.DB.FamilyElementVisibility
public class FamilyElementVisibility : APIObject
public void CreateAndSetVisibility(Autodesk.Revit.DB.Document familyDocument, SketchPlane sketchPlane)
{
// create a new ModelCurve in the family document
XYZ p0 = new XYZ(1, 1, 0);
XYZ p1 = new XYZ(5, 1, 0);
Line line1 = Line.CreateBound(p0, p1);
ModelCurve modelCurve1 = familyDocument.FamilyCreate.NewModelCurve(line1, sketchPlane);
// create a new ModelText along ModelCurve line
ModelText text = familyDocument.FamilyCreate.NewModelText("Hello World", null, sketchPlane, p0, HorizontalAlign.Center, 0.1);
// set visibility for text
FamilyElementVisibility textVisibility = new FamilyElementVisibility(FamilyElementVisibilityType.Model);
textVisibility.IsShownInTopBottom = false;
text.SetVisibility(textVisibility);
// set visibility for line
FamilyElementVisibility curveVisibility = new FamilyElementVisibility(FamilyElementVisibilityType.Model);
curveVisibility.IsShownInCoarse = false;
modelCurve1.SetVisibility(curveVisibility);
}
| Name | Return Type | Description | Inherited From |
|---|---|---|---|
| FamilyElementVisibility(FamilyElementVisibilityType) | None | Initializes a new instance of the class |
| Name | Return Type | Description | Inherited From |
|---|---|---|---|
| IsShownInCoarse | bool | Indicates if the instance is display with Coarse detail level in the view of project document. | |
| IsShownInFine | bool | Indicates if the instance is display with Fine detail level in the view of project document. | |
| IsShownInFrontBack | bool | Indicates if the instance is display in Front/Back view of project document. | |
| IsShownInLeftRight | bool | Indicates if the instance is display in Left/Right view of project document. | |
| IsShownInMedium | bool | Indicates if the instance is display with Medium detail level in the view of project document. | |
| IsShownInPlanRCPCut | bool | Indicates if the instance is displayed when cut in Plan/RCP (if the category permits). | |
| IsShownInTopBottom | bool | Indicates if the instance is display in Plan/RCP view of project document. | |
| IsShownOnlyWhenCut | bool | Indicates if the instance is displayed only if it has been cut. | |
| VisibilityType | FamilyElementVisibilityType | Indicates if the instance is Model or View specific. | |
| IsReadOnly | bool | Identifies if the object is read-only or modifiable. | APIObject |