MassInstanceUtils.AddMassLevelDataToMassInstance Method

MassInstanceUtilsAddMassLevelDataToMassInstance Method

Create a MassLevelData (Mass Floor) to associate a Level with a mass instance.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public static ElementId AddMassLevelDataToMassInstance(
	Document document,
	ElementId massInstanceId,
	ElementId levelId
)
Public Shared Function AddMassLevelDataToMassInstance ( 
	document As Document,
	massInstanceId As ElementId,
	levelId As ElementId
) As ElementId
public:
static ElementId^ AddMassLevelDataToMassInstance(
	Document^ document, 
	ElementId^ massInstanceId, 
	ElementId^ levelId
)
static member AddMassLevelDataToMassInstance : 
        document : Document * 
        massInstanceId : ElementId * 
        levelId : ElementId -> ElementId 

Parameters

document  Document
The Document.
massInstanceId  ElementId
The ElementId of the mass instance.
levelId  ElementId
The ElementId of the Level to associate with the mass instance.

Return Value

ElementId
The ElementId of the MassLevelData that was created, or the existing ElementId if it was already in added.
Exceptions
ExceptionCondition
ArgumentException The ElementId massInstanceId is not a mass instance. -or- The ElementId levelId is not a Level.
ArgumentNullException A non-optional argument was null
See Also