POST
|
I only need to remove one button of a group/menu, the rest of the menu should remain. But thank you for your tip.
... View more
04-25-2019
07:03 AM
|
0
|
0
|
825
|
POST
|
I have found a workaround: That's how you store data in the Project-Settings: https://github.com/esri/arcgis-pro-sdk/wiki/ProGuide-Custom-settings#step-6-implement-the-module-class-overrides-to-read-and-write-the-new-project-settings This way you even can store JSON or XML strings in the APRX-File. Furthermore you can use the URI Property of a layer as a unique identifier: https://pro.arcgis.com/en/pro-app/sdk/api-reference/index.html#topic11759.html
... View more
04-24-2019
06:56 AM
|
0
|
0
|
626
|
POST
|
My Add-In has several Features which can be activated and deactivated. If a Feature is deactivated a Button should be removed from a menu. But a custom condition only deactivats Buttons. How do I remove/change visibility of a Button at runtime?
... View more
04-24-2019
05:06 AM
|
0
|
4
|
896
|
POST
|
Hello, I am trying to start a ArcGIS Pro Dialog in my Add In, but I can't find them in the SDK. Can someone tell me how to open the two following Dialogs: 1. The User has to select a Feature-Class, so I need a "OpenFileDialog" with a Feature-Class Filter. 2. The User has to select a Symbol, so I need to open a kind of "Project/Styles"-Dialog with a specific Style selected. Then the User selects one Symbol of the Style, presses a OK/Apply Button and the selected Symbol is returned to my Add-In. Thank you very much for your help.
... View more
04-20-2017
08:52 AM
|
0
|
5
|
1765
|
POST
|
You have to reconnect to the Workspace, and look for the Feature-Class, again. Then only use the new FC-Object and dispose the old one.
... View more
10-19-2016
04:02 AM
|
0
|
1
|
1097
|
POST
|
Got it: Snippet Public Shared Function GetAGSFeatureLayer(ByVal sURL As String) As IFeatureLayer
Dim pAGSConnectionFactory As IAGSServerConnectionFactory
Dim pConnectionProps As IPropertySet
Dim pAGSConnection As IAGSServerConnection
Dim enumServerObjectName As IAGSEnumServerObjectName
Dim pServerObjectName As IAGSServerObjectName3
Dim pLayerFactory As ILayerFactory
Dim pEnumLayer As IEnumLayer
Dim pLayer As ILayer
Dim pCurrentLayer As ILayer
Dim pCompositeLayer As ICompositeLayer
Try
pConnectionProps = New PropertySet
pConnectionProps.SetProperty("URL", sURL)
pAGSConnectionFactory = New AGSServerConnectionFactory
pAGSConnection = pAGSConnectionFactory.Open(pConnectionProps, 0)
enumServerObjectName = pAGSConnection.ServerObjectNames
enumServerObjectName.Reset()
pServerObjectName = enumServerObjectName.Next
Do Until pServerObjectName Is Nothing
If pServerObjectName.Type.Equals("FeatureServer", StringComparison.OrdinalIgnoreCase) Then
pLayerFactory = New FeatureServerLayerFactory
pEnumLayer = pLayerFactory.Create(pServerObjectName)
pLayer = pEnumLayer.Next()
Do Until pLayer Is Nothing
If TypeOf pLayer Is ICompositeLayer Then
pCompositeLayer = pLayer
For i As Integer = 0 To pCompositeLayer.Count - 1
pCurrentLayer = pCompositeLayer.Layer(i)
If TypeOf pCurrentLayer Is IFeatureLayer Then
Return DirectCast(pCurrentLayer, IFeatureLayer)
End If
Next
End If
pLayer = pEnumLayer.Next()
Loop
End If
pServerObjectName = enumServerObjectName.Next
Loop
Catch ex As Exception
logger.Error("GetAGSFeatureLayer", ex)
End Try
Return Nothing
End Function
... View more
10-19-2016
02:57 AM
|
1
|
0
|
958
|
POST
|
Sorry, my english is not very good, maybe you didn't understand me right: I'm writing an ArcGIS Engine Application which should load Feature-Services the same way as ArcMap. And if I load a Feature-Service in ArcMap, ArcMap creates Layers with a Layername, a Symbology and a minimum scale. Now If I use your code from above in my ArcGIS Engine App, I only have a Feature-Class. The name and the alias-name of this Feature-Class is a number (e.g. 0). And if I create a new Layer and set the datasource, the Layer has no minimum scale. So, my question is: how does ArcMap gets the Layername and minimum scale from the Feature-Service? Your code from above does not answer this question. Thank you very much.
... View more
09-01-2016
08:24 AM
|
0
|
0
|
958
|
POST
|
Hello Sami, thank you, that's what I was looking for. But there are two more things I need to know: If I load a Feature Service in ArcMap, the Layers have Layernames which are the Name of the Feature-Class in their SDE. In ArcObjects the FC-Names are Numbers. Furthermore the Layer have set a minimum scale. Where do I find the FC-Name and minimum Scale in ArcObjects?
... View more
08-29-2016
11:44 PM
|
0
|
3
|
958
|
POST
|
Thank you, very much, but in your example you create your own new layer. Isn't it possible to get the layer with it's symbology/renderer from the Feature-Service?
... View more
08-28-2016
11:26 PM
|
0
|
5
|
958
|
POST
|
Hello, I'm trying to load a IFeatureLayer from a FeatureServer in a ArcGIS Engine 10.3 Application, but I always get a "System.Runtime.InteropServices.COMException" Error Message. (Line is marked with an Error Comment). What is the Problem of getting the Layers from the Server? Thank You very much for your help. Public Shared Function GetAGSFeatureLayer(ByVal sURL As String) As IFeatureLayer Dim pAGSConnectionFactory As IAGSServerConnectionFactory Dim pConnectionProps As IPropertySet Dim pAGSConnection As IAGSServerConnection Dim enumServerObjectName As IAGSEnumServerObjectName Dim pServerObjectName As IAGSServerObjectName3 Dim pName As IName Dim pObject As Object Dim pServerSymbolOutputOptions As IServerSymbolOutputOptions Dim pGraphicFeatureLayers As IGraphicFeatureLayers Dim pGraphicFeatureLayer As IGraphicFeatureLayer2 Dim pGraphicFeatureServer As IGraphicFeatureServer Try pConnectionProps = New PropertySet pConnectionProps.SetProperty("URL", sURL) pAGSConnectionFactory = New AGSServerConnectionFactory pAGSConnection = pAGSConnectionFactory.Open(pConnectionProps, 0) enumServerObjectName = pAGSConnection.ServerObjectNames enumServerObjectName.Reset() pServerObjectName = enumServerObjectName.Next Do Until pServerObjectName Is Nothing If pServerObjectName.Type.Equals("FeatureServer", StringComparison.OrdinalIgnoreCase) Then pName = pServerObjectName pObject = pName.Open If TypeOf pObject Is IGraphicFeatureServer Then pServerSymbolOutputOptions = New ServerSymbolOutputOptions pServerSymbolOutputOptions.ConvertLabelExpressions = False pServerSymbolOutputOptions.PictureOutputType = esriServerPictureOutputType.esriServerPictureOutputAsPNG pGraphicFeatureServer = pObject pGraphicFeatureLayers = pGraphicFeatureServer.GetLayers(pServerSymbolOutputOptions) 'ERROR If pGraphicFeatureLayers.Count > 0 Then For i As Integer = 0 To pGraphicFeatureLayers.Count - 1 pGraphicFeatureLayer = pGraphicFeatureLayers.Element(i) If TypeOf pGraphicFeatureLayer Is IFeatureLayer Then Return pGraphicFeatureLayer End If Next End If End If End If pServerObjectName = enumServerObjectName.Next Loop Catch ex As Exception logger.Error("GetAGSFeatureLayer", ex) End Try Return Nothing End Function
... View more
08-16-2016
07:05 AM
|
0
|
8
|
1902
|
POST
|
Who should I contact for help? I really need a solution to this problem.
... View more
03-23-2016
03:25 AM
|
0
|
1
|
626
|
POST
|
Hello, I'm writing an Extension for ArcGIS Pro. This Extension is creating special Layers which has to be recognised after saving and loading an aprx-File. In ArcObjects I used the ILayerExtensions and stored a unique String in the Layer to identify it after loading a MXD. What equivalent do you recommend for ArcGIS Pro? Is there a new/better way to store Data in a Layer or APRX-File? Thank you for your Help. Cheers Mickey
... View more
03-11-2016
03:01 AM
|
0
|
3
|
2885
|
Title | Kudos | Posted |
---|---|---|
1 | 10-19-2016 02:57 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|