![]() |
This document is archived and information here might be outdated. Recommended version. |
Looping on all the schematic attributes related to a given SchematicDiagramClass
/// <summary>
/// Looping on all the schematic attributes related to a SchematicDiagramClass
/// </summary>
/// <param name="schemDiagramClass">The SchematicDiagramClass the attributes are related to</param>
public void SchematicAttributeFromDiagramClass(ESRI.ArcGIS.Schematic.ISchematicDiagramClass schemDiagramClass)
{
// cast SchematicDiagramClass into ISchematicAttributeContainer
ESRI.ArcGIS.Schematic.ISchematicAttributeContainer schAttributeCont=(ESRI.ArcGIS.Schematic.ISchematicAttributeContainer)schemDiagramClass;
// retrieve all the SchematicAttribute in the schematic attribute container
ESRI.ArcGIS.Schematic.IEnumSchematicAttribute enumAttribute=schAttributeCont.SchematicAttributes;
enumAttribute.Reset();
// get the first SchematicAttribute
ESRI.ArcGIS.Schematic.ISchematicAttribute schAttribute=enumAttribute.Next();
bool isOk=false;
while (schAttribute != null)
{
// TODO: add your code here, set isOk to true to exit the loop
if (isOk) break;
// get the next SchematicAttribute
schAttribute=enumAttribute.Next();
}
}
''' <summary>
''' Looping on all the schematic attributes related to a SchematicDiagramClass
''' </summary>
''' <param name="schemDiagramClass">The SchematicDiagramClass the attributes are related to</param>
Public Sub SchematicAttributeFromDiagramClass(ByVal schemDiagramClass As ESRI.ArcGIS.Schematic.ISchematicDiagramClass)
' cast SchematicDiagramClass into ISchematicAttributeContainer
Dim schAttributeCont As ESRI.ArcGIS.Schematic.ISchematicAttributeContainer=TryCast(schemDiagramClass, ESRI.ArcGIS.Schematic.ISchematicAttributeContainer)
' retrieve all the SchematicAttribute in the schematic attribute container
Dim enumAttribute As ESRI.ArcGIS.Schematic.IEnumSchematicAttribute=schAttributeCont.SchematicAttributes
enumAttribute.Reset()
' get the first SchematicAttribute
Dim schAttribute As ESRI.ArcGIS.Schematic.ISchematicAttribute=enumAttribute.Next()
Dim isOk As Boolean=False
While (schAttribute IsNot Nothing)
' TODO: add your code here, set isOk to true to exit the loop
If (isOk) Then Exit While
' get the next SchematicAttribute
schAttribute=enumAttribute.Next()
End While
End Sub