ArcGIS Pro SDK问题主题 //www.gobook3.com/t5/arcgis-pro-sdk-questions/bd-p/arcgis-pro-sdk-questions ArcGIS Pro SDK问题主题 2023年1月14日星期六07:53:07 GMT arcgis-pro-sdk-questions 2023 - 01 - 14 t07:53:07z 在会话中为ArcGIS Pro外接程序建立SDE连接的最佳实践? //www.gobook3.com/t5/arcgis-pro-sdk-questions/best-practice-for-establishing-sde-connection-once/m-p/1246908#M9268 我正在开发一个带有一系列工具的外接程序,其中许多工具可以访问我们的SDE数据库(主要用于读取,但有时用于写入)。我被告知我应该每个会话只访问它一次,但我想知道是否有任何关于这个。 

的最佳实践的例子,目前我已经将它分离到一个“数据”类,但我的实现感觉过于复杂,因为我希望它使用基于开发或生产构建的不同连接字符串。有人有什么指导吗?文档中有例子吗?< / P >

Here's my current Data class:

 

 

public static class Data { private static DatabaseConnectionProperties _dbConnectionProperties = new DatabaseConnectionProperties(EnterpriseDatabaseType.Oracle) { AuthenticationMode = AuthenticationMode.DBMS, User = GetCredential("user"), Password = GetCredential("password"), Instance = GetCredential("instance") }; public static DatabaseConnectionProperties dbConnectionProperties { get { return _dbConnectionProperties; } } private static Geodatabase _sdeGeodatabase = new Geodatabase(_dbConnectionProperties); public static Geodatabase SDEGeodatabase { get => _sdeGeodatabase; } private static string GetCredential(string credential) { DbConnectionStringBuilder dbConnectionStringBuilder = new DbConnectionStringBuilder(); dbConnectionStringBuilder.ConnectionString = Settings.ConnectionString; if (credential == "user") return dbConnectionStringBuilder["User ID"].ToString(); if (credential == "password") return dbConnectionStringBuilder["Password"].ToString(); if (credential == "instance") return dbConnectionStringBuilder["Data Source"].ToString(); return null; } }

 

 

Thanks in advance.

2023年1月10日星期二17:55:05 GMT //www.gobook3.com/t5/arcgis-pro-sdk-questions/best-practice-for-establishing-sde-connection-once/m-p/1246908#M9268 succip 2023 - 01 - 10 - t17:55:05z
启用属性规则时不能创建特性! //www.gobook3.com/t5/arcgis-pro-sdk-questions/can-t-create-features-when-attribute-rules-are/m-p/1246584#M9263

Hi

在我非常简单的c#代码中有一个非常奇怪的异常。我试图在一个特征类中插入多边形特征,一切都工作得很完美,直到我创建了一个属性规则,在创建上的字段上调用序列。真正奇怪的是异常,因为我得到一个 ArcGIS.Core.Data.Exceptions。GeodatabaseEnterpriseException

'数据库级I/O错误发生。原因:底层DBMS错误[错误:几何类型(MultiPolygon)不匹配列类型(Polygon) (s100ed6.s101.geoms)::SQLSTATE=22023]'

如果我禁用属性规则,一切都重新工作。

直接在ArcGIS PRO中创建功能可以完美地工作,并且序列正在按照预期更新字段。< / P >

I would really appreciate any feedback on this topic

 

Best regards
Jens

 

星期一,2023年1月9日19:28:41格林尼治标准时间 //www.gobook3.com/t5/arcgis-pro-sdk-questions/can-t-create-features-when-attribute-rules-are/m-p/1246584#M9263 pocalipse 2023 - 01 - 09 - t19:28:41z
活动内容窗格 //www.gobook3.com/t5/arcgis-pro-sdk-questions/active-content-pane/m-p/1246380#M9258

Hi,

我试图在代码中激活导出表(所以我选择了一个层并调用ICommand)。

问题是我之前需要激活内容窗格。
pspada_WT_0-1673259842499.png

我想我需要这个,但是,如果是这样,我找不到窗格的ID。

pspada_WT_1-1673259953457.png

  星期一,2023年1月9日10:26:17 GMT //www.gobook3.com/t5/arcgis-pro-sdk-questions/active-content-pane/m-p/1246380#M9258 pspada_WT 2023 - 01 - 09 - t10:26:17z 出口图表 //www.gobook3.com/t5/arcgis-pro-sdk-questions/export-chart/m-p/1246257#M9257

Hi,

我有一个CIMChart对象。有一些方法与专业SDK导出它作为图像?< / P > 2023年1月7日星期六10:05:55 GMT //www.gobook3.com/t5/arcgis-pro-sdk-questions/export-chart/m-p/1246257#M9257 pspada_WT 2023 - 01 - 07 - t10:05:55z 如何添加一个新层,并添加点到它? //www.gobook3.com/t5/arcgis-pro-sdk-questions/how-to-add-a-new-layer-and-add-points-to-it/m-p/1246056#M9254

嗨,

我有一个点的列表(纬度,经度)。

 

谢谢!< / P > 星期五,2023年1月6日15:57:38 GMT //www.gobook3.com/t5/arcgis-pro-sdk-questions/how-to-add-a-new-layer-and-add-points-to-it/m-p/1246056#M9254 JinZ 2023 - 01 - 06 - t15:57:38z 锁文件阻止写入文件- gdb (BGLEngine相关!?!) //www.gobook3.com/t5/arcgis-pro-sdk-questions/lock-file-preventing-write-to-file-gdb-bglengine/m-p/1245970#M9250

嗨,我正在尝试将AnnotationFeatureClasses写入文件地理数据库。当我第一次写入FGDB时,它可以正常工作。锁文件被创建,但它们永远不会被删除。当我开始调试时,VisualStudio调试控制台会输出以下一行:

BGLEngine 0000023DA00ABB70被创建(从线程id: 3136)。

所有写操作完成后,调试控制台打印下一行:

BGLEngine 0000023DA00ABB70 was destroyed(从线程id: 3136)。FGDB上的

应该已经被移除。< / P >

However, the Lock never gets released and I will be unable to write a second time to the FGDB. When I stop the application the debug-console prints:

CIM.DLL Terminating!
Starting BGLEngine leak diagnostics...
*****************************************************
Check for unreleased BGL classes.
BGLCanvas: 1 objects leaked
BGLPath: 1 objects leaked
BGLEngine: 1 object leaked
All references to this Engine's BGL objects become invalid now.
*****************************************************
BGLEngine 0000023DA00ABB70 (from the thread id: 3136) is not released before unloading of the BGLAPI.dll.
BGLEngine leak diagnostics completed.

From what I understand is that I have to call Dispose() on every ArcGIS-Object related to databases. I am not sure where I might have left any reference to the ArcGIS code dangling. From the BGLEngine leak diagnostics I am geussing that there might be something wrong with the CIMLabelClasses, but those cannot be disposed. The only places where Dispose() must be called is where I interact with a DataBase.

星期五,2023年1月6日12:58:45 GMT //www.gobook3.com/t5/arcgis-pro-sdk-questions/lock-file-preventing-write-to-file-gdb-bglengine/m-p/1245970#M9250 Meroni 2023 - 01 - 06 - t12:58:45z
在ArcGIS Pro SDK上创建NuGet包 //www.gobook3.com/t5/arcgis-pro-sdk-questions/creating-a-nuget-package-built-on-the-arcgis-pro/m-p/1245663#M9242

我应该如何开始创建一个自定义实用程序NuGet包访问专业SDK功能?

我知道我可以创建外接程序或核心主机项目,但我应该为这个实用程序库使用什么类型的项目?外接程序项目具有实用程序库不需要的所有UI组件,但是核心主机项目具有入口点,这对于实用程序库也是不需要的。

我是否应该简单地创建一个核心主机项目,删除入口点程序类,然后开始添加类和方法,以供我的应用程序使用 周四,2023年1月5日16:51:57格林尼治标准时间 //www.gobook3.com/t5/arcgis-pro-sdk-questions/creating-a-nuget-package-built-on-the-arcgis-pro/m-p/1245663#M9242 DrewNemecekIp 2023 - 01 - 05 - t16:51:57z Geodatabase。计算抛出未实现的异常 //www.gobook3.com/t5/arcgis-pro-sdk-questions/geodatabase-evaluate-throw-not-implemented/m-p/1245626#M9237

Hi, 

I am trying to execute a query on sql database。我正在使用ArcgisPro,Net SDK。我遵循了文档中的示例。但是我得到了方法没有实现的异常。

这个方法真的没有实现吗?还是我错过了什么?非常感谢你的帮助。< / P >

Here is my code:

using Geodatabase geodatabase = new Geodatabase(connectionProperties);
// Use the geodatabase
QueryDef getMapListQueryDef = new QueryDef
{
SubFields = "FMB4_LatestWellStatusPackageProduct.Name,T_Well.Latitude, T_Well.Longitude, T_WELL.EPSG_NO",
Tables = "FMB4_LatestWellStatusPackageProduct,T_Well ,FMB_Product ",
WhereClause = "FMB4_LatestWellStatusPackageProduct.Well_ID=T_Well.ID AND FMB4_LatestWellStatusPackageProduct.ProductID=FMB_Product.ID AND[FMB4_LatestWellStatusPackageProduct.R_WELL_STATUS_ID <> 210 AND FMB_Product.Name ='" + fmbProduct+"'",
};

using (RowCursor rowCursor = geodatabase.Evaluate(getMapListQueryDef, false))
{
while (rowCursor.MoveNext())
{
using (Row row = rowCursor.Current)
{
string wellname = Convert.ToString(row["Name"]);
codeList.Add(wellname);
}
}
}

Thu, 2023年1月5日15:54:59 GMT //www.gobook3.com/t5/arcgis-pro-sdk-questions/geodatabase-evaluate-throw-not-implemented/m-p/1245626#M9237 JinZ 2023 - 01 - 05 - t15:54:59z
插件中的异步方法 //www.gobook3.com/t5/arcgis-pro-sdk-questions/async-methods-in-addin/m-p/1245624#M9236 我看到很多queuedtask.run的例子,这是根据文档让SDK的同步方法在后台运行。

我做了一个自定义画廊,并希望从下拉菜单上的门户填充数据。然后我遇到这样的语句:

var results = await ArcGISPortalExtensions。SearchForContentAsync(门户,查询);

我如何使用这些比正确地在公共异步void DropdownOpened?结果加载后,我想改变一些状态属性以及。< / P >

How will I be sure that the results are fully loaded first before the state change?

I tried many options already and I am not sure about any of them. In some cases nothing happens but the spinner is still visible and keeps on going.

 

Thu, 2023年1月5日15:50:05 GMT //www.gobook3.com/t5/arcgis-pro-sdk-questions/async-methods-in-addin/m-p/1245624#M9236 Mannus_Etten 2023 - 01 - 05 - t15:50:05z
如何通过命令行构建ArcGIS Pro配置解决方案? //www.gobook3.com/t5/arcgis-pro-sdk-questions/how-to-build-arcgis-pro-configuration-solution-via/m-p/1245402#M9233

环境:

Windows, net6.0

尝试设置Jenkins作业来构建ArcGIS Pro配置项目。该解决方案使用Visual Studio 2022编译成功,但无法通过命令行构建相同的解决方案。

复制步骤:

(a)启动Visual Studio并创建一个插件项目
(b)通过Visual Studio菜单构建
(c)构建良好
(d)在solution (.sln)文件存在的同一文件夹中打开命令提示符
(e)运行以下命令构建解决方案:
 ,dotnet build {add -solution}。sln
(f) Error occurred

"Error MSB4801: The task factory "CodeTaskFactory" is not supported on The .NET Core version of MSBuild"

.
星期三,2023年1月4日19:26:02 GMT //www.gobook3.com/t5/arcgis-pro-sdk-questions/how-to-build-arcgis-pro-configuration-solution-via/m-p/1245402#M9233 vijayk 2023 - 01 - 04 - t19:26:02z
如何在组合框中填充特征层的字段? //www.gobook3.com/t5/arcgis-pro-sdk-questions/how-do-you-populate-the-fields-of-a-feature-layer/m-p/1245379#M9232

我想知道如何在一个组合框的活动地图中填充一个特征层的字段?有一个ESRI社区的例子188金宝搏网址导航188金宝博复式,CreateReport是关于如何在ListBox中填充一个特性层的字段。用那个例子, 我能够在一个活动的地图中成功地填充特征层,但我不确定如何填充Dockpane的组合框中的字段。我知道我需要创建一个ObservableCollection对象,但我总是得到一个错误消息,说我可以将字符串变量转换为数据类型。如果您知道一个有用的示例,或者我在代码中更改了什么来填充字段,我将非常感谢您的帮助。

 

 

private ObservableCollection<Field>_fields = new ObservableCollection<Field>();公共ObservableCollection< Field>字段{get{返回_fields;}} private observablecolltion<AggField> _layerFie = new ObservableCollection<AggField>(); public ObservableCollection<AggField> AggFields { get { return _layerFields; } } private async Task GetFieldsAsync() { _fields.Clear(); if (SelectedAggLayer == null) return; await QueuedTask.Run((Action)(() => { foreach(var field in Fields) { var defFieldAction = (Action)(() => { _fields.Add(field); System.Diagnostics.Debug.WriteLine(field.Name); }); ActionOnGuiThread(defFieldAction); } })); } private void ActionOnGuiThread(Action theAction) { if (Application.Current.Dispatcher.CheckAccess()) { theAction(); } else { Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Normal, theAction); } }

 

 

 

2023年1月5日星期四19:24:08格林尼治标准时间 //www.gobook3.com/t5/arcgis-pro-sdk-questions/how-do-you-populate-the-fields-of-a-feature-layer/m-p/1245379#M9232 tzz_12 2023 - 01 - 05 - t19:24:08z
复制几何到剪贴板 //www.gobook3.com/t5/arcgis-pro-sdk-questions/copy-geometry-to-clipboard/m-p/1245209#M9229

Hello 

我试图实现一个功能,用户可以复制一个几何到剪贴板,然后将这个几何粘贴到一个现有的特征层与正确的几何类型使用“粘贴特殊”。然而,我真的很难找到一个解决方案。我在API中找到了ClipboardItem类,但我不确定如何将几何图形作为几何对象或特征对象复制到剪贴板。

如果这里有人已经完成了这个工作,我很乐意得到一些指点。

 

谢谢你的时间

Tor 

2023年1月4日星期三09:08:42 //www.gobook3.com/t5/arcgis-pro-sdk-questions/copy-geometry-to-clipboard/m-p/1245209#M9229 TorBø资源集 2023 - 01 - 04 - t09:08:42z
在ArcGIS Pro .Net SDK中使用插件为不同的文件扩展名添加功能层 //www.gobook3.com/t5/arcgis-pro-sdk-questions/adding-feature-layers-using-plugins-for-different/m-p/1244808#M9221

我已经成功地实现了多个文件扩展名,作为插件数据源添加到地图作为功能层。其中一些是新类型,一些是Pro可识别的类型(如csv)。对于新的类型,我已经创建了专业自定义项目开始。对于那些可识别的Pro根据文档没有必要。这是根据Pro文档

已被ArcGIS Pro使用的文件扩展名(包括门户,在线,地理数据库,工具箱等)不能被自定义项覆盖/扩展。这包括文本文件、xml文件、文件夹、数据库连接文件、层文件、任务文件、mxds、sxds等。在ArcGIS Pro使用的内容类型上定义的自定义项将被忽略。


我还添加了多种方式来添加数据源,如上下文菜单,拖放和使用添加数据在功能区。< / P >

This is mostly achieved using interface IMappableItem and implementing the below method for the Custom Item class

public List<string> OnAddToMap(ArcGIS.Desktop.Mapping.Map map)

But how to achieve these use cases to add as feature layers for extensions like CSV. Because for CSV Add Data in the Ribbon is just adding the standalone table. And for CSV I am not sure how to add the custom context menu implementation for Add To Current Map and Add To New Map.

So the question is how to achieve these use cases for File extensions already in use by ArcGIS Pro.

Right now to add the plugin as a feature layer for CSV is just handled using Drag and Drop handler. But how to achieve all the below use cases for CSV:

"Add Data" dialog
"Add Data from Path" dialog
drag/drop of your item from the catalog window to a map
drag/drop of your item from the catalog window to the TOC
drag/drop of your item from windows explorer to a map
drag/drop of your item from windows explorer to the TOC

2023年1月3日星期二09:14:59 GMT //www.gobook3.com/t5/arcgis-pro-sdk-questions/adding-feature-layers-using-plugins-for-different/m-p/1244808#M9221 RITASHKOUL 2023 - 01 - 03 - t09:14:59z
Pro Custom item .net sdk上下文菜单中的子菜单项 //www.gobook3.com/t5/arcgis-pro-sdk-questions/sub-menu-item-in-context-menu-of-pro-custom-item/m-p/1244184#M9213 我已经创建了一个专业自定义项目,以支持插件数据源中的新数据类型。点击右键,我创建了2个菜单。但我想添加一个菜单第二个。< / P > < P > & lt; insertModule id = " Addin_Module " className =“Module1的自动装载= " true "标题=“Module1的祝辞< BR / > & lt; controls> < BR / > & lt;按钮id =“Addin_AddToCurrentMap”标题=“添加到当前地图”className =“AddToCurrentMap”loadOnClick = " true " smallImage =“包:/ /应用程序:…/ ArcGIS.Desktop.Resources;组件/图片/ AddLayerFromPath16.png”largeImage =“包:/ /应用程序:…/ ArcGIS.Desktop.Resources;组件/图片/ AddLayerFromPath32.png”/祝辞< BR/><按钮id="Addin_AddToNewMap"标题="添加到新地图" className="AddToNewMap" loadOnClick="true" smallImage="pack://application:…/ArcGIS.Desktop.Resources;component/Images/AddLayerFromPath32.png" largeImage="pack://application:…/ArcGIS.Desktop.Resources;component/Images/AddLayerFromPath32.png" />
</ ArcGIS.Desktop.Resources;component/Images/AddLayerFromPath32.png" />
<refID="Addin_AddToNewMap" />
</menu>
</menus>

< categores>
<updateCategory refID="esri_customItems">
<insertComponent id="Addin_ProCustomItem" className="Addin.ProCustomItem">
<content displayName="pro自定义项" fileExtension="abc" isContainer="false" keywords="ProCustomItem" contextMenuID="Addin_ProCustomItem_ContextMenu">
<filterFlags>
<type id="AddToMap" />/></filterFlags>
</content>
</insertComponent>
</updateCategory>
</ categorories>

 

但是现在使用上面的代码,它只是在上下文菜单中添加了两个选项。我们如何使第二个选项成为带有子菜单的菜单。< / P >

@Wolf    @UmaHarano 

周四,2022年12月29日11:29:06 GMT //www.gobook3.com/t5/arcgis-pro-sdk-questions/sub-menu-item-in-context-menu-of-pro-custom-item/m-p/1244184#M9213 RITASHKOUL 2022 - 12 - 29 - t11:29:06z
通过SDK更改选项 //www.gobook3.com/t5/arcgis-pro-sdk-questions/change-options-by-sdk/m-p/1243727#M9206

我想改变;对于许多人来说,默认情况下GP工具中自动使用撤销选项。< / P >

You can see the option I would like to change in the attached screen shot.

Pro SDK have this: https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic73588.html  but it does not have this option.

I could not find anything in registry or user profile that store this option but since Pro "remember" the new value it must be written somewhere.

Any ideas?

Thanks

周二,2022年12月27日07:13:34 GMT //www.gobook3.com/t5/arcgis-pro-sdk-questions/change-options-by-sdk/m-p/1243727#M9206 mody_buchbinder 2022 - 12 - 27 - t07:13:34z
按属性标签 //www.gobook3.com/t5/arcgis-pro-sdk-questions/label-by-attribute/m-p/1242923#M9202

Hi大家

我试图用一个属性的值标记一个FeatureLayer,但不知为何它失败了。我已经计算了z值并想要标记它,但由于一些原因,它标记了另一个属性。

在CIMLabelClass中,我定义了表达式为“zValue”属性:

var labelFeatureLayer =新CIMLabelClass {Name =" labelFeatureLayer", ExpressionEngine = LabelExpressionEngine。Arcade, Expression = "$feature. "zValue", TextSymbol = SymbolFactory.Instance.ConstructTextSymbol().MakeSymbolReference(),能见度= true};var lyrDefn = fclay . getdefinition () as CIMFeatureLayer;var listLabelClasses = lyrdef . labelclasses . tolist ();listLabelClasses.Add (labelFeatureLayer);lyrDefn。LabelClasses = listLabelClasses.ToArray();fcLayer.SetDefinition (lyrDefn);fcler . setlabelvisibility (true);

 

但它只是显示了一个不同的属性(在这种情况下,它是objectid)

Daniel4_0-1671629918077.png

 

  星期三,2022年12月21日13:40:28 GMT //www.gobook3.com/t5/arcgis-pro-sdk-questions/label-by-attribute/m-p/1242923#M9202 Daniel4 2022 - 12 - 21 - t13:40:28z 企业数据库中网络数据集的检索路径 //www.gobook3.com/t5/arcgis-pro-sdk-questions/retriving-paths-for-network-datasets-in-enterprise/m-p/1242797#M9200

我正在开发一些ArcGIS Pro UI工具,需要运行自定义python地理处理工具作为工作流程的一部分。< / P >

I would like to grab the selected network dataset in the map and pass the path of the network dataset on as a parameter to the geoprocessing tool. Retrieving a path for a network dataset located in GDB works fine using the GetDataConnection() on the network dataset layer.

However, when the networks dataset is located in a sql server enterprise geodatabase I am not able to get valid network dataset path for the layer. Preferable the path should use the sde connection file used when the network dataset layer was added to the map (but any valid path pointing out the network dataset for use in a geoprocessing tool would do).

Is this possible in any way?

周二,2022年12月20日21:16:56 GMT //www.gobook3.com/t5/arcgis-pro-sdk-questions/retriving-paths-for-network-datasets-in-enterprise/m-p/1242797#M9200 StephenCochrane 2022 - 12 - 20 - t21:16:56z
使用内存特征类运行地理处理工具第一次工作,但第二次失败 //www.gobook3.com/t5/arcgis-pro-sdk-questions/running-geoprocessing-tool-using-memory-feature/m-p/1242529#M9199 在我的外接程序中,我正在使用< a href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/create-random-points.htm" target="_self">创建随机点工具使用约束特征类创建随机点。然而,由于工具在约束特征类中为每个特征创建了点数,我首先分解特征类并将其用作约束特征类。我为解散的特征类使用临时文件名,并在创建点后删除它。

private Geodatabase MemoryGeodatabase;//在其他地方设置私有SchemaBuilder MemorySchemaBuilder;MemoryConnectionProperties = new();string tempFileName = Path.GetFileNameWithoutExtension(Path.GetTempFileName());使用MemoryGeodatabase ??= SchemaBuilder.CreateGeodatabase(memoryConnectionProperties)) {MemorySchemaBuilder ??= new (MemoryGeodatabase);StatusMessage = $"正在溶解{SelectedFrameFeatureLayer.Name}…";IGPResult dissolveResult = await DissolveFeatures(frameFeatureClass, "", "", $"memory\\{tempFileName}", GPExecuteToolFlags.AddToHistory); if (dissolveResult.IsFailed) { Show_Status_Bar = false; StatusMessage = ""; MessageBox.Show("Dissolving feature class failed"); return; } using (FeatureClass dissolveFC = MemoryGeodatabase.OpenDataset<FeatureClass>(tempFileName)) { string Distance = ""; if (Use_Minimum_Distance && Minimum_Distance > 0) Distance = $"{Minimum_Distance} {SR.Unit.ToString().ToLower()}"; StatusMessage = "Generating points..."; IGPResult CreateRandomPointsResult = await CreateRandomPoints($"memory\\{tempFileName}", Path.GetDirectoryName(outputFileName), Path.GetFileName(outputFileName), SimpleRandomCount, Distance, GPExecuteToolFlags.AddOutputsToMap); FeatureClassDescription DissolveFCDescription = new(dissolveFC.GetDefinition()); MemorySchemaBuilder.Delete(DissolveFCDescription); MemorySchemaBuilder.Build(); } }

This runs properly the first time, but if I run it again, it throws an error on line 16 when it gets the temporary layer. The layer is created according to the history, but I get the error

 "Could not open the dataset 'tmp5EB3' of type FeatureClass. Please make sure a valid geodatabase or data store has been opened first."

dissolve.png

Why isn't this working on the second attempt?

星期一,2022年12月19日21:11:42 GMT //www.gobook3.com/t5/arcgis-pro-sdk-questions/running-geoprocessing-tool-using-memory-feature/m-p/1242529#M9199 KenBuja 2022 - 12 - 19 - t21:11:42z
复制/粘贴 //www.gobook3.com/t5/arcgis-pro-sdk-questions/copy-paste-special/m-p/1242475#M9198

你好,

我试图在我的插件中实现一点功能,我正在努力寻找一个解决方案。 

简短的介绍: 
Step1:插件包括一个注册点位置的工具。然后使用这些位置查询返回多线几何的路由服务。第2步:用户可以选择执行新的查询,或将几何图形存储到som形式的存储中。第1步已经完成,但是我正在努力弄清楚如何实现第2步。

是否有一种直接的方法为用户复制/存储几何到一个特征层?可以将其存储到in_memory工作区,也可以使用复制/粘贴命令到现有的polyline-featurelayer中。有人这样做过吗,或者有什么好的建议吗?


很高兴得到任何帮助或指出正确的方向。< BR / > < BR / > regards  < BR / > Tor < BR / > < BR / > < BR / > < BR / > < / P > 星期一,2022年12月19日19:29:35 GMT //www.gobook3.com/t5/arcgis-pro-sdk-questions/copy-paste-special/m-p/1242475#M9198 TorBø资源集 2022 - 12 - 19 - t19:29:35z 是否存在从映射中检索现有层的组件? //www.gobook3.com/t5/arcgis-pro-sdk-questions/does-a-component-exist-to-retrieve-existing-layers/m-p/1242197#M9194

我在一个外接程序上工作,需要能够使用目前添加在地图的内容窗格中的层。我想看看是否有一个ProSnippet可以让我直接添加这个组件。我想使用的组件看起来是这样的,我在ArcGIS Pro周围看到了它。它还允许您使用动态创建的几何图形。< / P >

KevinCheriyan_0-1671235337304.png

The closest thing I could find was using a ComboBox in combination with Map class's GetLayersAsFlattenedList method. But this still leaves a lot of functionality missing from the component I would've like to use.

 

 

2022年12月17日星期六00:09:02 GMT //www.gobook3.com/t5/arcgis-pro-sdk-questions/does-a-component-exist-to-retrieve-existing-layers/m-p/1242197#M9194 KevinCheriyan 2022 - 12 - 17 - t00:09:02z