我用代码操作将数据集导出为VCT时好像附带导出了idx格式的数据,不确定是不是附带的,如果是附带的话请问该如何取消这个附带呢,附上导出VCT方法的代码
public override List<DataExchangeResult> ExportData(string path, List<Dataset> exportDatasets, VCTVersion version = VCTVersion.LANDUSE_VCT30)
{
List<DataExchangeResult> result = new List<DataExchangeResult>();
try
{
ExportSettingVCT exportSettingVCT = new ExportSettingVCT();
exportSettingVCT.SourceDatas = exportDatasets.ToArray();
exportSettingVCT.TargetFileType = FileType.VCT;
exportSettingVCT.IsOverwrite = true;
exportSettingVCT.TargetFilePath = path;
exportSettingVCT.Version = version;
exportSettingVCT.IgnoreFieldNames = new string[2] { "UserID", "SmUserID" };//WZJ
if (version == VCTVersion.LANDUSE_VCT30)
{
exportSettingVCT.ConfigFilePath = NaturalResourcesToolkit.GetApplicationPath("\\Config\\VCT3.0_Config.config");
}
else if (version == VCTVersion.LANDUSE_VCT)
{
exportSettingVCT.ConfigFilePath = NaturalResourcesToolkit.GetApplicationPath("\\Config\\VCT2.0_Config.config");
}
DataExport dataExport = new DataExport();
dataExport.ExportSettings.Add(exportSettingVCT);
ExportResult er = dataExport.Run();
dataExport.Dispose();
DataExchangeResult exchangeResult = new DataExchangeResult();
exchangeResult.ExchangeType = ExchangeType.Export;
if (er.FailedSettings.Length > 0)
{
exchangeResult.IsSuccee = false;
}
if (er.SucceedSettings.Length > 0)
{
exchangeResult.IsSuccee = true;
}
result.Add(exchangeResult);
}
catch (Exception ex)
{
m_log.Error(ex.Message, ex);
return null;
}
return result;
}