|
POST
|
I don't work with addins so I can't tell you exactly, but I believe ArcGIS installs addins to a common folder. You can't install an addin anywhere on your computer like you can when you install normal programs. Your config file will need to go into this same location. Again, I don't know the exact details but I believe you can package the config file up with the rest of the assembly files and they will all be unpacked to the same location. If you leave the config file where it currently is then you will have to use some other method to find it.
... View more
01-12-2012
08:11 AM
|
0
|
0
|
3941
|
|
POST
|
Exactly what do you mean when you say neither worked? path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.Location) This returns the full path to the directory that contains your assembly dll. If the config file is in this same directory then all you need to do is append the filename to this path.
... View more
01-12-2012
06:48 AM
|
0
|
0
|
3941
|
|
POST
|
What is the exact message? You should be able to copy/paste from the Visual Studio window.
... View more
01-09-2012
09:46 AM
|
0
|
0
|
2267
|
|
POST
|
There are several things I would change in your code. 1) You declare and set the variable uid but then never use it. I would get rid of it or change the call to FindExtensionByName to FindExtensionByCLSID and use it. 2) You're checking the editor's Edit State and exiting if an edit session is not already started. Therefore, you shouldn't attempt to start an edit session later in the code. Remove that call to start the edit session. 3) You're declaring pFCursor, filling it from the selection set and getting the first feature from it. You then do not use it for anything. 4) pFeat = pFLayer.NextFeature I'm not sure how you don't get a compile error here. IFeatureSelection doesn't have a NextFeature method. I would get rid of this and use the feature you got from pFCursor earlier. 5) Make sure all of those field names are spelled correctly. Is PROJECTYPE really spelled with only one T? 6) You should enclose your edits within an edit operation.
... View more
01-06-2012
09:07 AM
|
0
|
0
|
2267
|
|
POST
|
You're declaring Editor twice. You should only be declaring it once. If you want the variable to be module level then keep the Public declaration and remove the Dim. The line should be: Editor = My.ArcMap.Document.FindExtensionByName("ESRI Object Editor") If you want the variable to have local scope then remove the Public declaration and edit local declaration to include the data type: Dim Editor As IEditor = My.ArcMap.Document.FindExtensionByName("ESRI Object Editor") Also, this line is incorrect: If Editor.EditState <> Editor Then You should replace Editor with an EditState enumeration value. You should also put your edits inside of an edit operation, which I don't see in your code.
... View more
01-05-2012
06:44 AM
|
0
|
0
|
2267
|
|
POST
|
The variable you are using to reference the editor is named Editor, not IEditor. Or at least I think it is. I don't see where you are declaring it or setting its value. Change IEditor to Editor and it should work.
... View more
01-05-2012
04:58 AM
|
0
|
0
|
2267
|
|
POST
|
You can only add features to a feature class that has been made z/m aware if that feature's geometry is also z/m aware. In your code you are creating a point collection (as a new polyline), adding points to it and then using it as the new feature's geometry. You're making each point you add z/m aware and assigning z/m values to it. This is all correct except that you never made the polyline z/m aware and, therefore, it will ignore any z/m values that the points in its point collection may contain. In other words, adding z/m aware points to a geometry doesn't make that geometry z/m aware. You need to change your code to create a new polyline, make it z/m aware and then QI to IPointCollection to add the points. Dim polyline As IPolyline Set polyline = New Polyline Dim zAware As IZAware Set zAware = polyline zAware.ZAware = True Dim mAware As IMAware Set mAware = polyline mAware.MAware = True Dim pointCollection As IPointCollection Set pointCollection = polyline 'now add the points
... View more
12-20-2011
05:32 AM
|
0
|
0
|
1631
|
|
POST
|
If your application is not running inside of ArcMap then you can't have an IMxDocument reference or an IApplication reference. IMxDocument refers to an ArcMap document and IApplication refers to the ArcMap application itself. If you're not inside of ArcMap then neither of those things exist in your application.
... View more
12-20-2011
04:21 AM
|
0
|
0
|
754
|
|
POST
|
You're making the points z and m aware and assigning valid values for Z and M, but you're not making the polyline itself z or m aware.
... View more
12-20-2011
04:14 AM
|
0
|
0
|
1631
|
|
POST
|
Does anyone know if a BalloonCallout can be used for labeling or is it restricted to annotations only? Yes, as far as I know you can. You should be able to get the label properties from IGeoFeatureLayer.AnnotationProperties. QI over to ILabelEngineLayerProperties and you can set the symbol used for labeling. When you create the symbol, use a formatted text symbol. The callout can be applied by setting the IFormattedTextSymbol.Background property. Does ESRI actually have people on staff that can write applications using their API? Yes, they do. All of the ArcGIS Desktop applications are written using the ArcObjects API. In fact, that's the reason the ArcObjects API was created. Wouldn't it be nice if there was a place you could request samples? Nice, yes. Practical, no. ESRI provides a pretty good amount of free support for developers already. You can purchase technical support through a support agreement/contract, although I don't know that you can simply pay them to write a sample. I think you actually have to have a problem. Wouldn't it be nice if someone at the company followed these forums? They do. Technically these are user forums, meaning users provide all of the participation. However, there are a handful of ESRI employees who regularly post here.
... View more
12-19-2011
08:58 AM
|
0
|
0
|
636
|
|
POST
|
I believe it's not finding it because you are setting the NoCreate parameter to True for the call to Find. This means it won't create the object if it isn't already created. Context menus are created on demand so there won't be an instance for Find to return unless it creates one. Pass in False and your code should work.
... View more
12-16-2011
08:26 AM
|
0
|
0
|
2302
|
|
POST
|
Kevin, Sean's example is how you would do this sort of thing but I'd like to point out one major point. Notice in his code how he is using the extension to register an event handler for the OnStartEditing event. In this event, he checks to see if the command is already on the context menu and adds it if it is not. The CommandBars collection is a property of the document, so the toolbars and menus can differ from one document to the next. In your case you would want to listen for the NewDocument and OpenDocument events. In these events you would check the context menu to see if the command needs to be added.
... View more
12-16-2011
04:26 AM
|
0
|
0
|
2302
|
|
POST
|
You don't need an IApplication reference to edit data nor do you need ArcMap. ArcGIS Engine comes with quite a few built-in tools that you may be able to use. There may also be geoprocessing tools that can help you do what you need to do. Anything else you need can be programmed with ArcObjects.
... View more
12-14-2011
08:07 AM
|
0
|
0
|
1521
|
|
POST
|
I'm still confused as to what you're trying to do. Getting the AppRef returns a reference to the currently running ArcGIS Desktop application. If your code isn't running inside of an ArcGIS Desktop application then the call will fail. AppRef can't be used outside of ArcMap, ArcCatalog, etc.
... View more
12-14-2011
04:57 AM
|
0
|
0
|
1521
|
|
POST
|
I'm confused. There is no IApplication for Engine. Only the ArcGIS Desktop applications (ArcMap, ArcCatalog, etc) implement IApplication. What are you trying to do?
... View more
12-13-2011
12:32 PM
|
0
|
0
|
1521
|
| 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
|