CreateSubElementGUID Method


Creates a consistent GUID for an IFC entity related to a Revit element. A "related" sub-element is one that is unique for a given type of element, and can therefore by identified by a simple index value (e.g. PSet_Wall_Common property set for a wall.) The index value 0 is reserved, as this would generate the GUID of the element itself. A listing of known sub-elements is contained in IFCSubElementEnums.cs; it is expected that this list would be maintained up-to-date, instead of passing arbitrary values into this function.

Namespace: Autodesk.Revit.DB.IFC
Assembly: RevitAPIIFC (in RevitAPIIFC.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2013

Syntax

C#
public static string CreateSubElementGUID(
	Element pElement,
	int subElementIndex
)
Visual Basic
Public Shared Function CreateSubElementGUID ( _
	pElement As Element, _
	subElementIndex As Integer _
) As String
Visual C++
public:
static String^ CreateSubElementGUID(
	Element^ pElement, 
	int subElementIndex
)

Parameters

pElement
Type: Autodesk.Revit.DBElement
The element.
subElementIndex
Type: SystemInt32
The global index for this sub-element.

Return Value

The guid string.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →