AutoCAD Map 3D 2009 Geospatial Platform Reference

AutoCAD Map 3D Geospatial Platform API

virtual STRING MgResourceIdentifier::GetRepositoryName (  )  [virtual]

Extracts the repository name from a resource's identifier.

.NET Syntax
virtual string GetRepositoryName();
Java Syntax
virtual String GetRepositoryName();
PHP Syntax
virtual string GetRepositoryName();

Returns:
Returns the repository name. For session repositories, the name is the session ID. For library repositories, the name is an empty string.
Example (PHP)
 $resourceID = new MgResourceIdentifier("Session:$sessionID//Geography/World.MapDefinition");
 $repository_name = $resourceID->GetRepositoryName();
 // returns: "b9b617ac-ffff-ffff-8000-005056c00008_eng"

 $resourceID = new MgResourceIdentifier("Library://Geography/World.MapDefinition");
 $repository_name = $resourceID->GetRepositoryName();
 // returns: ""