POST
|
That's good to know. There must be some sort of bug in the widget I'm using that is causing it to not format the layer definitions correctly. Thanks!
... View more
09-05-2013
05:50 AM
|
0
|
0
|
344
|
POST
|
I've been working on a widget to allow a user to filter the display of a FeatureLayer by setting a layerDefinition expression in the parent ArcGISDynamicMapServiceLayer's layerDefinitions property. I'm wondering if it is possible to use wildcard expressions in the layerDefinition? I've tried using both '*' and '%' as wildcard characters. I have tried using '=' and 'LIKE' as the logical operators in the expression but none of those options seem to work? Thanks!
... View more
09-04-2013
01:27 PM
|
0
|
3
|
1638
|
POST
|
That makes sense, we've found (so far) that using any "old" connection properties will create this problem as soon as we try to connect to another instance on the same server (via code, arcToolbox, arcCatalog, etc.). The old instance is referenced no matter what, until everything is closed out and re-opened, and then you can only open one connection before the same problem occurs. That seems to be the issue. Since I have been having other issues with using 10.1 connections in 9.3 layers (the file loads in ArcGIS 9.3.1 but the layer has a broken link), I ported the code to 9.3 and I did not have any issues with it. Thank you for all your help!
... View more
06-25-2013
10:54 AM
|
0
|
0
|
502
|
POST
|
Connections are a little different at 10.1, are you trying to connect using the actual server name, or an alias set up for the instance? Also you might try checking if a feature class exists before opening it, and then handling that situation before the exception is thrown. I was worried it might be something like that. I am using an alias for the SERVER value but it's not unique to a specific instance. Also, I knew I forgot to mention something; the layers I'm getting the connection information from were created in ArcGIS 9.3. You're right; I should be checking it that way. I'll be sure to change the code. Thanks!
... View more
06-21-2013
12:11 PM
|
0
|
0
|
502
|
POST
|
I'm trying to write an ArcCatalog 10.1 Add-in where you select a folder in ArcCatalog and click a button that kicks off a process that searches through the directory for layer files and switches the connection information if it meets certain requirements. I'm running into an issue using the SDEWorkspaceFactory class in the following code where I try to change the connection information: Type factoryType = Type.GetTypeFromProgID("esriDataSourcesGDB.SdeWorkspaceFactory"); IWorkspaceFactory2 workspaceFactory = (IWorkspaceFactory2)Activator.CreateInstance(factoryType); IWorkspace workspace = workspaceFactory.Open(connectionPropertySet, ArcCatalog.Application.hWnd); IFeatureWorkspace featureWorkspace = (ESRI.ArcGIS.Geodatabase.IFeatureWorkspace)workspace; IFeatureClass featureClass = featureWorkspace.OpenFeatureClass(datasetName.Name); if (featureClass == null) { return false; } featureLayer.FeatureClass = featureClass; The issue is that I supply workspaceFactory.Open with the following connection properties. SERVER: *myServer* INSTANCE: *instance2* USER: *user* PASSWORD: *password* AUTHENTICATION_MODE: *authentication mode* VERSION: *version* The workspace I get back does not always have matching connection properties. Instead it has... SERVER: *myServer* INSTANCE: *instance1* USER: *user* PASSWORD: *password* AUTHENTICATION_MODE: *authentication mode* VERSION: *version* IS_GEODATABASE: *is geodatabase* CONNPROP-REV: *connprop-rev* Since it returns the wrong instance, the call featureWorkspace.OpenFeatureClass(datasetName.Name) throws an exeption since the feature we are looking for does not exist in the specified instance. All the other connection properties are fine. I'll note that this is not a consistent problem. Sometimes I pass *instance1* and get *instance2* or vice versa and sometimes I get the correct instance. Usually, running the tool a couple times switches all the files. The tool is written in C# using ArcObjects 10.1 and .NET Framework 3.5
... View more
06-21-2013
09:34 AM
|
0
|
4
|
2250
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|