AutoCAD Map 3D 2009 Geospatial Platform Reference

AutoCAD Map 3D Geospatial Platform API

virtual MgByteReader* MgResourceService::EnumerateReferences ( MgResourceIdentifier resource  )  [pure virtual]

Enumerates all the resources which reference the specified resource.

.NET Syntax
virtual MgByteReader EnumerateReferences(MgResourceIdentifier resource);
Java Syntax
virtual MgByteReader EnumerateReferences(MgResourceIdentifier resource);
PHP Syntax
virtual MgByteReader EnumerateReferences(MgResourceIdentifier resource);

Parameters:
resource (MgResourceIdentifier) Resource to get references for.
Returns:
Returns an MgByteReader object containing the list of all resources which reference the specified resource. The list is in XML format using the ResourceReferenceList schema.
Example (PHP)
 // Assuming $resourceService is already initialized.
 $resourceID= new MgResourceIdentifier('Library://Samples/Sheboygan/Layers/BuildingOutlines.LayerDefinition');
 $byteReader = $resourceService->EnumerateReferences($resourceID);
 echo $byteReader->ToString();

 /* Returns for example:
 <?xml version="1.0" encoding="UTF-8"?>
 <ResourceReferenceList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ResourceReferenceList-1.0.0.xsd">
     <ResourceId>Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition</ResourceId>
 </ResourceReferenceList>
 */

Exceptions:
MgInvalidRepositoryTypeException 
MgInvalidRepositoryNameException 
MgInvalidResourcePathException 
MgInvalidResourceNameException 
MgInvalidResourceTypeException