SampleLineGroupReportQuantities Method

Generate quantities report for a group of sample lines.

Namespace: Autodesk.Civil.DatabaseServices
Assembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.8.0.292
Syntax
public static void ReportQuantities(
	ObjectId sampleLineGroupId,
	string materialList,
	string reportFile,
	string styleSheetFile
)

Parameters

sampleLineGroupId  ObjectId
The ObjectId of sample line group.
materialList  String
Name of the matiernal list to report quantities.
reportFile  String
Name of the report (XML) file.
styleSheetFile  String
Name of the style sheet (XSL) file. (Optional) If present, the XML report will contain a processing instruction for the style sheet specified by styleSheetFile. Otherwise (null or empty), the XML report won't have processing instruction for style sheet.
Exceptions
ExceptionCondition
ArgumentException Thrown when sampleLineGroup is not valid, or null/empty value passed in for materialList or reportFile.
[!:System.Runtime.InteropServices::COMException] Thrown when error occurs during XML generation and save.
Example
This example shows how to create quantities report for a sample line group.
C#
 1// Assume all referenced objects are available in current document.
 2
 3// 'alignment' is an Alignment object opened for read.
 4var allSlgOids = alignment.GetSampleLineGroupIds();
 5ObjectId oidSlg = allSlgOids[0];
 6
 7SampleLineGroup slg = oidSlg.GetObject(OpenMode.ForRead) as SampleLineGroup;
 8string[] mappingNams = slg.GetQTOMappingNames();
 9
10// Plain XML report.
11SampleLineGroup.ReportQuantities(oidSlg, mappingNams[0], "report-01.xml", "");
12
13// Report with style sheet.
14SampleLineGroup.ReportQuantities(oidSlg, mappingNams[0], "report-02.xml", "style.xsl");
See Also