POST
|
Hi I am trying to add a new Field to a standalone table with: Field field = new Field(); IFieldEdit2 fieldEdit = (IFieldEdit2)field; fieldEdit.Name_2 = name; fieldEdit.Type_2= esriFieldType.esriFieldTypeRaster ; ......... IRasterDef rasterDef = new RasterDefClass(); rasterDef.Description = "Raster Field"; rasterDef.IsManaged = true; fieldEdit.RasterDef = rasterDef; table.AddField((IField)fieldEdit); but i throws the following exception: {"Only one raster column is supported in this operation"} this only happens when the type of the field is " esriFieldType.esriFieldTypeRaster " with other types everything works any help will be appreciated regards.
... View more
10-26-2012
10:58 AM
|
0
|
0
|
255
|
POST
|
You can find the ecp file here: c:\program files\esri\license10.0\sysgen\keycodes. This keycodes file can be opened in notepad and saved as a .ecp extension as a backup and can be used to reauthorize ArcGIS Server on the same machine. If you need to authorize ArcGIS Server on a different machine, you will need to authorize it against ESRI Customer Service the same way your first machine was initially authorized. I have the same problem, I want to deauthorize(deactivate) arcGIS server license I have tried removing the file "keycodes" but it seems that it doesn't work because all services(arcGIS, arcSIsSOC, sde) are still running I have also checked a way to use SoftwareAuthorization.exe(for server) with -return but nothing happens and there is no any documentation about this. I have a .ecp file that I use to authorize the arcGISServer but what I need is to deauthorize without uninstall all the server any help will be appreciated thanks
... View more
03-20-2012
10:52 AM
|
0
|
0
|
833
|
POST
|
Hi, I have the following : QueryTask queryTask = new QueryTask(currentMapInfo.Url + "/" + parcelsLayerIndex); queryTask.ExecuteCompleted += new EventHandler<QueryEventArgs>(queryTask_ExecuteCompleted); queryTask.Failed += new EventHandler<TaskFailedEventArgs>(query_Failed); Query query = new Query(); query.Where = "Status LIKE 'Active'"; query.OutFields.AddRange( new string[] { "*" } ); queryTask.ExecuteAsync(query); as you can see in the query.where I want to use the value of Status but when I execute que query there is not result this happens because Status is a domain so I have to use the value 2 instead of 'Active' is this a bug?? what can I do so that Querytask resolve Domain values??? regards.
... View more
04-04-2011
02:02 PM
|
0
|
1
|
552
|
POST
|
Your code should work, but you will need to revert back to the classic snapping environment via IEditProperties4.ClassicSnapping or assume this is done on the editor options UI. hi, this is the code I am using: public void SetSnapEnvironment(string targetlayer) { bool stopEditingAtFinish = false; UIDClass edUID = new UIDClass(); edUID.Value = ToolBarsNameIds.EsriEditorUId; //edUID.Value = "esriEditor.Editor";<-this is the id ESRI.ArcGIS.Editor.IEditor editor = MyExtension.Extension.m_app.FindExtensionByCLSID(edUID) as ESRI.ArcGIS.Editor.IEditor; ESRI.ArcGIS.Editor.ISnapEnvironment env = (ESRI.ArcGIS.Editor.ISnapEnvironment)editor; UIDClass eUID = new UIDClass(); edUID.Value = ToolBarsNameIds.EsriEditorUId; ESRI.ArcGIS.ArcMapUI.IMxDocument document = (ESRI.ArcGIS.ArcMapUI.IMxDocument)MyExtension.Extension.m_app.Document; try { if (document.FocusMap != null && document.FocusMap.LayerCount > 0) { ILayer selectedLayer = null; if ( document.SelectedLayer != null ) selectedLayer = document.SelectedLayer; else selectedLayer = GetTarguetLayer( targetlayer ); if (editor.EditState != esriEditState.esriStateEditing) { editor.StartEditing((((ESRI.ArcGIS.Carto.IFeatureLayer)selectedLayer).FeatureClass as ESRI.ArcGIS.Geodatabase.IDataset).Workspace); stopEditingAtFinish = true; } } } catch (Exception exc) { clsLog.MsgLog(exc.Message); } ISnappingWindow window=null; IFeatureSnapAgent agent=null; try { UID snapWindowid=new UID(); snapWindowid.Value=ToolBarsNameIds.EsriEditorSnappingWindowsUid; window=(ISnappingWindow)editor.FindExtension(snapWindowid); for (int i = 0; i < env.SnapAgentCount; i++) { agent = (IFeatureSnapAgent)env.get_SnapAgent(i); UILayer layer = GetUILayerByName(agent.Name); if (layer != null) { if (!layer.IsVertex && !layer.IsEdge && !layer.IsEnd) { agent.HitType = esriGeometryHitPartType.esriGeometryPartNone; } if (!layer.IsVertex && !layer.IsEdge && layer.IsEnd) { agent.HitType = esriGeometryHitPartType.esriGeometryPartEndpoint; } if (!layer.IsVertex && layer.IsEdge && !layer.IsEnd) { agent.HitType = esriGeometryHitPartType.esriGeometryPartBoundary; } if (!layer.IsVertex && layer.IsEdge && layer.IsEnd) { agent.HitType = esriGeometryHitPartType.esriGeometryPartBoundary | esriGeometryHitPartType.esriGeometryPartEndpoint; } if (layer.IsVertex && !layer.IsEdge && !layer.IsEnd) { agent.HitType = esriGeometryHitPartType.esriGeometryPartVertex; } if (layer.IsVertex && !layer.IsEdge && layer.IsEnd) { agent.HitType = esriGeometryHitPartType.esriGeometryPartVertex | esriGeometryHitPartType.esriGeometryPartEndpoint; } if (layer.IsVertex && layer.IsEdge && !layer.IsEnd) { agent.HitType = esriGeometryHitPartType.esriGeometryPartVertex | esriGeometryHitPartType.esriGeometryPartBoundary; } if (layer.IsVertex && layer.IsEdge && layer.IsEnd) { agent.HitType = esriGeometryHitPartType.esriGeometryPartVertex | esriGeometryHitPartType.esriGeometryPartBoundary | esriGeometryHitPartType.esriGeometryPartEndpoint; } } } /*************for target layer********************/ if (!string.IsNullOrEmpty(step.TargetLayer)) { ILayer itargetlayer = GetTarguetLayer(targetlayer); if (itargetlayer != null) { ((IEditLayers)editor).SetCurrentLayer((IFeatureLayer)itargetlayer, 0); } } /******************************************/ window.RefreshContents(); if(stopEditingAtFinish) editor.StopEditing(true); } catch (Exception exc) { clsLog.MsgLog(exc.Message); } } this method is used to set targetLayer in editor(target layer comboBox in arcMap9.3) and set the snap environment, this code doesn't throw any exception but it doesn't work, could you tell me please what things I should change to get this working in arcMap 10?? also could you tell me how to programmatically start a EditTask.? regards.
... View more
02-22-2011
04:39 AM
|
0
|
0
|
272
|
POST
|
Hi, I want to change programmatically change the target layer and the snapEnvironment(vertex, edge, end) of a layer(s) I knew how to do it in arcMap 9.3 using IEditor, ISnapEnvironment and IEditLayers but since EditorToolbar has changed it seems that that code doesn't work in arcMap 10 could you please tell me how to do it??? regards.
... View more
02-16-2011
03:04 AM
|
0
|
2
|
1713
|
POST
|
A field's visibility setting applies only for the document you've added the table to. It isn't stored in the database, shapefile, or whatever other datasource you may be using. So , Isn't There a way to do it?? basically what I need to do is set the visibility of a Field so that this visibility is setted for anytime the attributes table is used. maybe another approach to do this??? regards. Cristian.
... View more
08-19-2010
06:14 AM
|
0
|
0
|
136
|
POST
|
I have the following method to set the visibility of a field in a ITable : public void UpdateAttributeVisibility ( string name, bool visible ) { try { IWorkspace workspace = Connect( Environment.MachineName, "5151", "sde", "sde", "sde", "DEFAULT", "SampleDataSet" ); if ( workspace != null ) { IFeatureWorkspace featureWorkspace = ( IFeatureWorkspace )workspace; string qualifiedName = GetQualifiedName( workspace, "LUPAP_NP_PARCEL" ); if ( !string.IsNullOrEmpty( qualifiedName ) ) { ITable table = featureWorkspace.OpenTable( qualifiedName ); IStandaloneTable standaloneTable = new StandaloneTableClass(); standaloneTable.Table = table; if ( table != null ) { int index = ( ( ITableFields )standaloneTable ).FindField( name ); IFieldInfo info = ( ( ITableFields )standaloneTable ).get_FieldInfo( index ); info.Visible = visible; //now how do I Commit these changes????????????? } } } } catch ( Exception exc ) { Log.Fail( exc.StackTrace ); throw exc; } } the question is how can I set visibility of the desired column(field) so that this visibility is permanent in the ITable? I would appreciate any help regards.
... View more
08-18-2010
03:14 PM
|
0
|
2
|
2349
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|