Tag Info

Hot answers tagged

7

I am not very strong in this area either, but I have modified the Snippets module and have made a couple wrappers for very simple tasks. I have an example of just adding line elements. The example at under the main block forms a triangle to the layout view just outside the document. I use this script in conjunction with another and arcpy search cursors ...


3

ESRI recommends to use the Microsoft .NET Framework 3.5 Service Pack 1 for version 10 and higher: ArcObjects SDK System Requirements for 10.1 ArcObjects SDK System Requirements for 10.2 So as you can see in this post What are the correct version numbers for C#? you should learn C# 3.0.


2

MapControl is an engine component to create your own window to display map contents. I've looked before and never found a way to get a reference to the ArcMap MapControl. ArcMap may not even use a MapControl for its display, it may use some other internal class. Two options: 1) var ave = ActiveView as IActiveViewEvents; ave.AfterDraw += onAfterDraw; ...


2

They also have instructions for using .NET 4.0 or 4.5 if you wish to take advantage of the new language features: .NET 4.0 and 4.5 support for ArcGIS 10.2 Desktop and Engine developers The only change you need to make is to edit ArcMap.exe.config (or the relevant .exe.config for the application you are extending) and changing: <startup> ...


2

The following code fixed it for me. Change this: Message msgForm = new Message(); msgForm.lbl.Text = message; msgForm.ShowDialog(); To this: MessageBox.Show(message);


1

I don't program in C# so may be what I am going to suggest is actually valid syntax for c#? I think the problem is this line: if (mxdoc.SelectedLayer == layer) If VB .net one would not compare two layer objects this way. If this was me using VB I would have done it this way: if mxdoc.SelectLayer.Name = layer.Name then msgbox "same!" end if


1

So, I've solved this question myself. The requirement was to send the annotation data to an annotation feature class within a GDB. Whilst I am yet to be able to create GDB and FCs with ArcObjects, I created these manually and then created the pointer variables that accepted the annotation data. Consequently, ArcMap did not fall over and produced the desired ...


1

Since you say you have some experience in Python, I believe what you are trying to do could be accomplished with a Python Add-In (I'm not well versed in ArcObjects and C#). I have a jankety workaround function that I call in other scripts that will generate annotation feature classes (always for a soils data set) based on a project boundary. The way this ...



Only top voted, non community-wiki answers of a minimum length are eligible