首页 / 浏览问题 / 组件GIS / 问题详情
iObjects .NET导出VCT格式数据的问题
20EXP 2023年03月09日
我用代码操作将数据集导出为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;
        }

1个回答

您好,idx格式的数据不是导出时自带的,正常导出只有.vct和.config文件,建议您检查代码是否有其他操作。

希望可以帮助到您!
2,503EXP 2023年03月09日
请问一下导出有idx这个文件格式的操作吗,有的话是用的哪个参数呢
没有导出idx文件的操作。
...