FamilyElementVisibility
Provides access to the visibility parameters of family elements in family document.
Inheritance Hierarchy
System.Object
Autodesk.Revit.DB.APIObject
Autodesk.Revit.DB.FamilyElementVisibility
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class FamilyElementVisibility : APIObject
The FamilyElementVisibility type exposes the following members.
Constructors
Name
Description
Public Method
FamilyElementVisibility
Initializes a new instance of the FamilyElementVisibility class
Properties
Name
Description
Public Property
Code Example
IsReadOnly
Identifies if the object is read-only or modifiable.
(Inherited from APIObject)
Public Property
IsShownInCoarse
Indicates if the instance is display with Coarse detail level in the view of project document.
Public Property
IsShownInFine
Indicates if the instance is display with Fine detail level in the view of project document.
Public Property
IsShownInFrontBack
Indicates if the instance is display in Front/Back view of project document.
Public Property
IsShownInLeftRight
Indicates if the instance is display in Left/Right view of project document.
Public Property
IsShownInMedium
Indicates if the instance is display with Medium detail level in the view of project document.
Public Property
IsShownInPlanRCPCut
Indicates if the instance is displayed when cut in Plan/RCP (if the category permits).
Public Property
IsShownInTopBottom
Indicates if the instance is display in Plan/RCP view of project document.
Public Property
IsShownOnlyWhenCut
Indicates if the instance is displayed only if it has been cut.
Public Property
VisibilityType
Indicates if the instance is Model or View specific.
Methods
Name
Description
Public Method
Dispose
Causes the object to release immediately any resources it may be utilizing.
(Inherited from APIObject)
Public Method
Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object)
Public Method
GetHashCode
Serves as the default hash function.
(Inherited from Object)
Public Method
GetType
Gets the Type of the current instance.
(Inherited from Object)
Public Method
ToString
Returns a string that represents the current object.
(Inherited from Object)
Example
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);
}