|
POST
|
It's probably just poor wording. The ConstructUnion method takes a parameter of type IEnumGeometry. As long as the class instance you pass into the method implements this interface then there should be no reason for it not to work. The GeometryBag coclass implements IEnumGeometry so therefore it should be just as valid as any other class that implements that interface. With one stipulation - all of the geometries in the bag must be of the same dimension. I believe what the help is actually trying to say is that the ConstructUnion is not implemented by the GeometryBag class. The GeometryBag class implements ITopologicalOperator but the the implementation for the ConstructUnion method may be empty (i.e. there's no actual code there). I have not run any tests to see if this is true or not.
... View more
01-19-2011
04:57 AM
|
0
|
0
|
706
|
|
POST
|
Applications running against ArcGIS 10 need to bind to a runtime before they can function. Not only do you have to recompile, you have to add the code to bind to the correct runtime. See the help article on migrating your code to ArcGIS 10 for more info.
... View more
01-14-2011
04:43 AM
|
0
|
0
|
830
|
|
POST
|
The Guids for most of the ArcMap tools and commands are listed here: http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/ArcMap_commands/00010000029s000000/
... View more
01-12-2011
10:52 AM
|
0
|
0
|
1100
|
|
POST
|
The solution in that link is pretty much the same thing as the code I posted except they're putting the installer class in its own project. They then add new custom actions to the installer project to call this installer class. I used the same installer class that I had been using just so that I wouldn't have to remove the old custom actions and add new ones (not that it would take any real effort to do so). The big difference between their solution and mine is how the installer class get the path to your assembly. In my code, I'm using the Reflection namespace to get the needed path. It's easy and it works. Their solution is getting the path through a property you have to set inside your installer project. This is what they're doing in the walkthrough when they are setting the CustomActionData property in the custom action properties dialog. If you use this solution, you'll have to change this so that it uses the location of the assembly you want to register. I haven't tried it but you'll probably need to change the value to something like this: /arg1="[TARGETDIR]\yourAssemblyName.dll". This is assuming you're installing the assembly directly to the target directory. Othewise you'll also have to append whatever subdirectory path you're installing to before the assembly filename.
... View more
01-12-2011
08:23 AM
|
0
|
0
|
2119
|
|
POST
|
Yes, exclude all of the ESRI references. The code I posted is in C# and I don't have a VB.NET version. This is an untested conversion of the first routine: myBase.OnAfterInstall(savedState);
Dim regAsmPath As String = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonProgramFiles), "ArcGIS\bin\ESRIRegAsm.exe")
Dim appPath As String = System.Reflection.Assembly.GetExecutingAssembly().Location
Dim args As String = """" & appPath & """ /p:Desktop /s"
Dim startInfo As System.Diagnostics.ProcessStartInfo = new System.Diagnostics.ProcessStartInfo()
startInfo.FileName = regAsmPath
startInfo.Arguments = args
System.Diagnostics.Process.Start(startInfo)
... View more
01-12-2011
07:51 AM
|
0
|
0
|
2119
|
|
POST
|
Use the IAppRot interface. There is a developer sample that deals with automation that you might want to look at as well.
... View more
01-12-2011
04:37 AM
|
0
|
0
|
891
|
|
POST
|
Just a quick check: are you binding to the Desktop product runtime and then checking out a license at the appropriate level before running this code? Standalone applications must do this before making any ArcObjects calls or they will not run properly.
... View more
01-12-2011
04:35 AM
|
0
|
0
|
1023
|
|
POST
|
That is correct, the old Install/Uninstall code is no longer needed. I commented out that code and added the code I posted earlier. I used the same Installer class so that I wouldn't have to add new Custom Actions for a new Installer class.
... View more
01-04-2011
12:08 PM
|
0
|
0
|
2119
|
|
POST
|
I've only migrated one project so far, but I followed these instructions and ran into no problems. http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Migrating_ArcGIS_9_3_Desktop_and_Engine_custom_components_to_ArcGIS_10/0001000002m2000000/ I chose the option to modify the project file to call esriRegAsm.exe instead of using the Add from File option. The project I migrated used a standard Visual Studio Deployment project to create the installer. I removed the code in the Installer class to register my classes with the ESRI component categories. I then added code to call esriRegAsm to perform the category component registration. This is the code I added to the OnAfterInstall event in the installer class: protected override void OnAfterInstall(IDictionary savedState)
{
base.OnAfterInstall(savedState);
string regAsmPath = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonProgramFiles), "ArcGIS\\bin\\ESRIRegAsm.exe");
string appPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
string args = "\"" + appPath + "\" /p:Desktop /s";
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.FileName = regAsmPath;
startInfo.Arguments = args;
System.Diagnostics.Process.Start(startInfo);
} This is the code I added to the OnBeforeUninstall event: protected override void OnBeforeUninstall(IDictionary savedState)
{
base.OnBeforeUninstall(savedState);
string regAsmPath = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonProgramFiles), "ArcGIS\\bin\\ESRIRegAsm.exe");
string appPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
string args = "\"" + appPath + "\" /p:Desktop /u /s";
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.FileName = regAsmPath;
startInfo.Arguments = args;
System.Diagnostics.Process.Start(startInfo);
}
... View more
01-03-2011
09:48 AM
|
0
|
0
|
2119
|
|
POST
|
Your best bet is to probably try displaying these items inside something like a picture box control that is placed directly on top of the map control on the form. Set the display properties of the control so that the control itself isn't visible (i.e. doesn't have a border, has a transparent background, etc). You can then set the draw order of the controls so that the picture box control is higher up and always draws on top.
... View more
12-21-2010
10:04 AM
|
0
|
0
|
677
|
|
POST
|
Use IHitTest. One of the return parameters of the HitTest method is the segment index.
... View more
12-15-2010
07:31 AM
|
0
|
0
|
738
|
|
POST
|
I haven't had need to create an add-in yet but just a quick question. When you compile your add-in, is Visual Studio creating the project output in one location (i.e. the Debug directory under your project directory) and then the output is copied to a location where ArcGIS expects to find it (i.e. the Add-ins directory)? If so, have you tried modifying your Visual Studio project properties to create the project output directly in the ArcGIS Add-ins directory? One thing that could be happening is Visual Studio is creating registry entries for your classes each time the project is compiled and then ArcGIS is doing the same thing when it finds your add-in assemblies. This causes confusion because the system has entries in the registry for the same classes in two separate locations. If this is indeed what is happening, then the only way I know to rectify the situation is to delete all of the class entries in the registry, which can be tricky to say the least.
... View more
12-14-2010
12:06 PM
|
0
|
0
|
1799
|
|
POST
|
I could be wrong but I believe IActiveView.FullExtent is automatically calculated and this will overwrite any custom value you set. In order to set a custom full extent, I believe you need to set IMap.AreaOfInterest.
... View more
12-14-2010
11:47 AM
|
0
|
0
|
930
|
|
POST
|
Looks like you have an IFeature reference so just QI to IPolyline. Use IPolyline.FromPoint and IPolyline.ToPoint.
... View more
12-14-2010
09:55 AM
|
0
|
0
|
539
|
|
POST
|
These instructions are for Visual Basic, they may be different for C#: In the Solution Explorer, double-click My Project On the Compile tab, choose All Configurations in the Configuration drop-down Click the Advanced Compile Options button Choose x86 in the Target CPU drop-down If this does not correct your problem, then the problem is most likely something else. EDIT: here are the instructions from ESRI for both VB.NET and C#. These steps are required now at ArcGIS 10 but we ran into issues at 9.3.1 as well that were resolved by setting the target CPU to x86. http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//0001000002ns000000
... View more
12-09-2010
05:18 AM
|
0
|
0
|
1567
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-20-2014 05:29 AM | |
| 1 | 02-01-2011 04:18 AM | |
| 1 | 02-04-2011 04:15 AM | |
| 1 | 01-17-2014 03:57 AM | |
| 1 | 10-07-2010 07:37 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|