AutoCAD Map 3D 2009 Geospatial Platform Reference

AutoCAD Map 3D Geospatial Platform API

MgResourceIdentifier::MgResourceIdentifier ( CREFSTRING  resource  ) 

Initialize and validate a resource identifier from a string.

Remarks:
The resource pointed to does not need to exist yet.
For the library repository, the path must begin Library://. For session repositories, it must begin Session:identifier://where identifier is the session identifier.
.NET Syntax
MgResourceIdentifier(string resource);
Java Syntax
MgResourceIdentifier(String resource);
PHP Syntax
MgResourceIdentifier(string resource);

Parameters:
resource (String/string) The location of a document or a folder.
The string cannot be empty. It can contain spaces but cannot contain any of the characters *:|?<’&”>=
If the resource is a folder, you must include the trailing slash.
Examples (PHP)
 $newResourceID = new MgResourceIdentifier("Library://Geography/World.MapDefinition");

 $newResourceID = new MgResourceIdentifier("Session:Session1234//Geography/World.Map");

 $newResourceID = new MgResourceIdentifier("Library://Floor Plans/New York/");

Exceptions:
MgOutOfMemoryException 
MgInvalidRepositoryTypeException 
MgInvalidRepositoryNameException 
MgInvalidResourcePathException 
MgInvalidResourceNameException 
MgInvalidResourceTypeException 
MgInvalidRepositoryTypeException