POST
|
I belive BinaryData in SQL is nothing but BLOB esri field format. If so, the elements can be stored into BLOB fields using IPersistStream interface. You can look for an article to find a way to store the data using IMemoryBlobStream and IPersistStream interfaces.
... View more
10-28-2012
10:58 AM
|
0
|
0
|
4
|
POST
|
Hi, Field renaming capability is enabled in 10.1 release. Good. Is there any interface to handle the renaming event. Basically i would like to perform a custom action when a field is renamed. Thanks in Advance.
... View more
09-17-2012
04:52 AM
|
0
|
0
|
481
|
POST
|
The following link might be useful. http://forums.esri.com/Thread.asp?c=93&f=1707&t=224203&g=1 Hi thaviti: I tried with the firing the event, but the Attribute Window still doesn't update. Do I need to implement event handler for "SelectionChanged"? Thank you!
... View more
07-05-2012
09:11 AM
|
0
|
0
|
22
|
POST
|
Fire SelectionChanged after changing the selectionset. Hi Everybody: I am writing code to programatically create new features, select features on the map, and keep the attribute window open to display the new feature in an edit session. However, even though I could select the feature and get it highlighted on the map, the attribute window does not display the new selected feature properly. Following is the code I used to select the feature: // This section of code is repeatly run to clear previously created feature and select newly created feature // select the new feature (mapLayer as IFeatureSelection).Clear(); (mapLayer as IFeatureSelection).SelectionSet.Add(newFeature.OID); (mapLayer as IFeatureSelection).SelectionChanged(); // open the attribute window UID attributeWinId = new UIDClass(); attributeWinId.Value = "esriEditor.AttributeWindow"; IAttributeWindow attributeWin = m_editor.FindExtension(attributeWinId) as IAttributeWindow; attributeWin.Visible = true; // refresh the view (m_Application.Document as IMxDocument).ActiveView.Refresh(); For the first time this section of code is executed in an ArcMap edit session, the attribute window is opened (originally closed) and it displays the newly selected feature, but for the second time this code runs the displayed feature in attribute window wouldn't be updated automatically. How to synchonize it with the actual selection? Thank you!
... View more
07-04-2012
09:01 AM
|
0
|
0
|
22
|
POST
|
You cant use Me.Close in New() method as the form is not yet created but getting initialised. You can call Me.Close only after displaying form using either Form.Show or Form.ShowDialog. How can I close a Form without ArcMap crashing? Example: Imports ESRI.ArcGIS.esriSystem Imports ESRI.ArcGIS.Geometry Imports ESRI.ArcGIS.Geodatabase Imports ESRI.ArcGIS.Carto Imports System.IO Imports Microsoft.VisualBasic Imports System Imports System.Windows.Forms Public Class FindAddressForm Inherits System.Windows.Forms.Form Public Sub New() MyBase.New() InitializeComponent() ' Populate the street name ComboBox from text file Dim streetList As String streetList = "\\csjs186\CPCommon\ArcMap Add-ins\StreetNameList2.txt" If File.Exists(streetList) Then Dim r As IO.StreamReader r = New IO.StreamReader(streetList) While (r.Peek() > -1) ComboBox1.Items.Add(r.ReadLine.Trim) End While r.Close() Else MsgBox("Can't find " + streetList) Me.Close() End If End Sub
... View more
06-22-2012
08:09 AM
|
0
|
0
|
1
|
POST
|
How I can remove Schema lock? That is full cod of creating shape file (C# VS2010 arcgis engine 2010): public void createShpFile(string shpName, DataTable dataTable) { //++++++++++++++ Create a new Shapefile with given name +++++++++++++++++++++++++++ //Get the factory ShapefileWorkspaceFactory factory = new ShapefileWorkspaceFactory(); //Create a workspace IWorkspaceName workspaceName = factory.Create(parentDirectory, catalogName, null, 0); IName name = workspaceName as IName; //QI to IFeatureWorkspace IFeatureWorkspace featWorkspace = (IFeatureWorkspace)name.Open(); // Create a Fields collection to describe the fields of the new feature class. IFields fields = new Fields(); IFieldsEdit fieldsEdit = fields as IFieldsEdit; // Add an "OBJECTID" field (feature classes must have this!) IField oidField = new Field(); IFieldEdit oidFieldEdit = oidField as IFieldEdit; oidFieldEdit.Name_2 = "OBJECTID"; oidFieldEdit.Type_2 = esriFieldType.esriFieldTypeOID; fieldsEdit.AddField(oidField); // Create a geometry definition object describing the geometries ISpatialReferenceFactory srFactory = new SpatialReferenceEnvironmentClass(); IGeographicCoordinateSystem gcs = srFactory.CreateGeographicCoordinateSystem((int)esriSRGeoCSType.esriSRGeoCS_WGS1984); IProjectedCoordinateSystem pcs = srFactory.CreateProjectedCoordinateSystem((int)esriSRProjCSType.esriSRProjCS_Pulkovo1942GK_6); IGeometryDef geometryDef = new GeometryDef(); IGeometryDefEdit geomDefEdit = geometryDef as IGeometryDefEdit; geomDefEdit.GeometryType_2 = esriGeometryType.esriGeometryPoint; geomDefEdit.SpatialReference_2 = pcs; IField shpField = new Field(); IFieldEdit shpFieldEdit = shpField as IFieldEdit; shpFieldEdit.Type_2 = esriFieldType.esriFieldTypeGeometry; shpFieldEdit.Name_2 = "Shape"; shpFieldEdit.GeometryDef_2 = geomDefEdit; fieldsEdit.AddField(shpField); esriFieldType fieldType; int fieldLength; int i = 0; foreach (DataColumn col in dataTable.Columns) { IField aField = new Field(); IFieldEdit aFieldEdit = aField as IFieldEdit; getFieldType(col, out fieldType, out fieldLength); aFieldEdit.Type_2 = fieldType;//esriFieldType.esriFieldTypeString string colName = col.ColumnName; if (colName.ToLower() == "пло�?ад�?_нелесной_зон�?") colName = "�?ло�?ад�?Нелесной�?он�?"; else if (colName == "код_пожа�?а_сзбаол") continue;// colName = "код�?ожа�?азбаол"; else if (colName == "код_�?айона_сзбаол") continue;// aFieldEdit.Name_2 = colName; aFieldEdit.Length_2 = fieldLength; fieldsEdit.AddField(aField); i++; } //Create FeatureClass IFeatureClass featClass = featWorkspace.CreateFeatureClass(shpName, fields, null, null, esriFeatureType.esriFTSimple, "Shape", ""); } Release the resources....IFeatureClass, IFeatureWorkspace variables.... e.g. marshal.ReleaseComobject(featClass);
... View more
06-14-2012
09:28 AM
|
1
|
2
|
53
|
POST
|
Hi, Is there a way to change an esricontrol's tooltip? I tried using the ICommand interface but the tooltip propertry is read-only. If I have to build a whole new ICommand and/or ITool is there way I can extend a esricontrol so I do not have to build a new control from scratch? Thank you. David If u r interested to change tooltip property of an In-Built ESRI command/tool then make use of ICommandItem .
... View more
06-13-2012
08:47 AM
|
0
|
0
|
10
|
POST
|
try releasing featureBuffer and cursorReferenceInsert objects e.g. in .Net, we can write Marshal.ReleaseComObject( cursorReferenceInsert)
... View more
06-12-2012
07:28 AM
|
0
|
0
|
6
|
POST
|
Hi Gray, Thanks for your reply again. Let me try ur approach. But I doubt whether i can embed the default behaviour of the WPF Controls. e.g. If the Control is Listbox and Down key is pressed, will the next item get selected by default or I need to write code for that too.
... View more
07-20-2011
05:08 AM
|
0
|
0
|
1
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|