SilverScreen Solid Modeler

AttributeList

AttributeList

Previous topic Next topic  

AttributeList

Previous topic Next topic JavaScript is required for the print function  

SilverSharpAPI

 

AttributeList

 


An AttributeList enumerator is used to traverse a list of SilverSharp ATTRIBUTEs. Because the AttributeList class supports the IEnumerable interface, the enumerators in a AttributeList work with the Visual-C# foreach statement.

 


C# Code

 

 class AttributeList : System.Collections.IEnumerable

    {

    };

 

 

Remarks

The only way to create an AttributeList is to obtain one from a SCHEMA_NODE

 

See Also

SCHEMA_NODE

 

Example

The following code shows how to enumerate all attributes of all schemas of an object entity:

C# Code

 

 using SilverSharp;

 

 . . .

 

 OBJECT_NODE obj = SC.get_bos("object \\assembly\\a1\\a2\\claw\\claw2") as OBJECT_NODE;

 

 if ( BOS_NODE.IsEmpty(obj) )

    return;

 

 foreach ( SCHEMA_NODE schema in obj.Schemas )

    {

    foreach ( ATTRIBUTE_NODE attribute in schema.Attributes )

       VisitOneAttribute(attribute);

    }