STK Vector Geometry ToolSend comments on this topic.
IAgCrdnCollection Interface

Description

A collection of VGT objects.

Public Methods

Public Method ContainsSearches for a an element with a given name. Returns false if the specified element does not exist.
Public Method GetItemByIndexRetrieves an item from the crdn collection by index.
Public Method GetItemByNameRetrieves an item from the crdn collection by name.

Public Properties

Public Property CountReturns a number of elements in the collection.
Public Property ItemRetrieves an element of the collection using the name of the element or a position in the collection.

Example

Get an embedded component
[C#]
if (crdn.EmbeddedComponents.Contains("Origin"))
{
    IAgCrdn embeddedComponent = crdn.EmbeddedComponents["Origin"];
}
Enumerate all embedded components of a VGT component
[C#]
foreach (IAgCrdn embeddedComponent in crdn.EmbeddedComponents)
{
    Console.WriteLine("Name: {0}, kind: {1}", embeddedComponent.Name, embeddedComponent.Kind);
}
Iterate all embedded components of a VGT component
[C#]
for (int i = 0; i < crdn.EmbeddedComponents.Count; i++)
{
    IAgCrdn embeddedComponent = crdn.EmbeddedComponents[i];
    Console.WriteLine("Name: {0}, kind: {1}", embeddedComponent.Name, embeddedComponent.Kind);
}
Get an embedded component
[Visual Basic .NET]
If crdn.EmbeddedComponents.Contains("Origin") Then
	Dim embeddedComponent As IAgCrdn = crdn.EmbeddedComponents("Origin")
End If
Enumerate all embedded components of a VGT component
[Visual Basic .NET]
For Each embeddedComponent As IAgCrdn In crdn.EmbeddedComponents
	Console.WriteLine("Name: {0}, kind: {1}", embeddedComponent.Name, embeddedComponent.Kind)
Next
Iterate all embedded components of a VGT component
[Visual Basic .NET]
Dim i As Integer = 0
While i < crdn.EmbeddedComponents.Count
	Dim embeddedComponent As IAgCrdn = crdn.EmbeddedComponents(i)
	Console.WriteLine("Name: {0}, kind: {1}", embeddedComponent.Name, embeddedComponent.Kind)
	System.Math.Max(System.Threading.Interlocked.Increment(i),i - 1)
End While
© 2024 Analytical Graphics, Inc. All Rights Reserved.