Web API Reference | MapGuide Open Source

- Overview
- Modules
- Classes

DescribeDrawing
EnumerateLayers
EnumerateSectionResources
EnumerateSections
GetCoordinateSpace
GetDrawing
GetLayer
GetSection
GetSectionResource
virtual MgByteReader* MgDrawingService::GetSection | ( | MgResourceIdentifier * | resource,
|  | CREFSTRING | sectionName |
| ) |  |  | `[pure virtual]`
Gets a DWF containing only the requested section (sometimes called a sheet). .NET Syntax
`virtual MgByteReader GetSection(MgResourceIdentifier resource, string sectionName);`
Java Syntax
`virtual MgByteReader GetSection(MgResourceIdentifier resource, String sectionName);`
PHP Syntax
`virtual MgByteReader GetSection(MgResourceIdentifier resource, string sectionName);`
  Parameters:
  | resource | (MgResourceIdentifier) Resource identifier specifying the drawing source which has the DWF resource data.
  | sectionName | (String/string) Name of the section. Section names can be retrieved via EnumerateSections or from the `manifest.xml` file via DescribeDrawing.
Returns: Returns an MgByteReader object containing the DWF for the specified section. Example (PHP)
     // Assuming the drawing service has already been initialized
     $drawing_ID = new MgResourceIdentifier('Library://DrawingService/Floorplan.DrawingSource');
     $sectionName = 'com.autodesk.dwf.ePlot_9E2723744244DB8C44482263E654F764';
     $byteReader = $drawingService->GetSection($drawing_ID, $sectionName);
  Exceptions:
  | MgDwfSectionNotFoundException | if the requested section does not exist in the DWF package.
  | MgInvalidDwfSectionException | if the 2d graphics resource for the DWF section cannot be found.
  | MgNullReferenceException | no data could be read from the DWF resource.
  | MgOutOfMemoryException | if there is insufficient memory to complete the operation.
  | MgServiceNotAvailableException | if the underlying resource service cannot be obtained to access the drawing in the resource repository.
  | MgXmlParserException | if there are problems parsing the resource content specified by the resource identifier.
  | MgInvalidDwfPackageException | if the DWF specified by the resource identifier is not a DWF of version 6.0 or greater.
  | MgDwfException | if the DWF component encounters errors.
  | MgTemporaryFileNotAvailableException | if a temporary file needed to complete the operation cannot be generated or accessed.
Note: See MgResourceService for additional exceptions.

Comments or suggestions? Send us feedback.