Altova MapForce 2025 Enterprise Edition

_NewEnum

Home Prev Top Next

This property supports language-specific standard enumeration.

 

Signature

_NewEnum : IUnknown

 

Errors

Error code

Description

1500

The object is no longer valid.

 

Examples

// ------------------------------------------------------------

// JScript sample - enumeration of a project's project items.

function AllChildrenOfProjectRoot()

{

    objProject = objMapForce.ActiveProject;

    if ( objProject != null )

    {

        for ( objProjectIter = new Enumerator(objProject); ! objProjectIter.atEnd(); objProjectIter.moveNext() )

        {

            objProjectItem = objProjectIter.item();

 

            // do something with project item here

        }

    }

}

 

// ------------------------------------------------------------

// JScript sample - iterate all project items, depth first.

function IterateProjectItemsRec(objProjectItemIter)

{

    while ( ! objProjectItemIter.atEnd() )

    {

        objProjectItem = objProjectItemIter.item();

        // do something with project item here

 

        IterateProjectItemsRec( new Enumerator(objProjectItem) );

 

        objProjectItemIter.moveNext();

    }

}

function IterateAllProjectItems()

{

    objProject = objMapForce.ActiveProject;

    if ( objProject != null )

    {

        IterateProjectItemsRec( new Enumerator(objProject) );

    }

}

© 2018-2024 Altova GmbH