SubComponent.ElementArray

Description

Sets or returns an Array containing the index of each element contained in the SubComponent.

C# Syntax

// get accessor
Object rtn = SubComponent.ElementArray;
// set accessor
SubComponent.ElementArray = Object;

Examples

VBScript Example

set oObject = Application.ActiveSceneRoot.AddGeometry("Cube","MeshSurface","MyCube")
myVertexArray = Array(2,3,34,56)
FindInvalidSubComponentIndex siVertexCluster, myVertexArray, oObject
Sub FindInvalidSubComponentIndex( in_ClusterType, in_IndexArray, in_Object)
	Dim l_invalidIndexArray, l_validArray, l_subComponent, l_bNotFound
	set l_subComponent = oObject.ActivePrimitive.Geometry.CreateSubComponent(in_ClusterType, in_IndexArray)
	l_validArray = l_subComponent.ElementArray
	for i = lbound(in_IndexArray) to ubound(in_IndexArray)
		l_bNotFound = TRUE
		for j = lbound(l_validArray) to ubound(l_validArray)
			if in_IndexArray(i) = l_validArray(j) then
				l_bNotFound = FALSE
				Exit For
			end if
		next
		if l_bNotFound then
			Application.LogMessage in_IndexArray(i)
		end if				
	next
End Sub