|
POST
|
You're adding the text elements to the map's graphics container. Your code that deletes the elements is looping through the page layout's graphics container. The map and the page layout are both graphics containers and contain their own set of graphic elements.
... View more
08-31-2011
05:16 AM
|
0
|
0
|
1648
|
|
POST
|
A balloon callout isn't a type of graphic element so you can't loop through the elements looking for it. A callout is a text background object, which is a property of a text element that uses a formatted text symbol. In order to determine if a graphic element has a callout you first need to determine whether or not it implements ITextElement. If it does, then you need to check to see if the type of symbol is IFormattedTextSymbol. If it is, then you need to see if the background object is set and if so if it is IBalloonCallout. Or if you're just interested in deleting all text elements then just check the element type and delete it if it's ITextElement.
... View more
08-30-2011
12:51 PM
|
0
|
0
|
1648
|
|
POST
|
You can't. A feature layer and a feature class are two different things. A feature layer is a type of layer object that is displayed in a map. A feature class is a type of table with a geometry field. Feature layers use feature classes as data sources. You can create a new feature layer and set the feature class to be its data source but you can't get a feature layer reference directly from the feature class.
... View more
08-29-2011
09:47 AM
|
0
|
0
|
1609
|
|
POST
|
I see that I incorrectly told you that your original installer class code was for registering an addin. That's not true, that is the code you need for your installer to kick off the component category registration for ArcGIS 10. The code I posted in that reply is for ArcGIS 9.3.1 and earlier. So, if you're deploying for 10 your original installer class code should work now that you corrected the registration code in your toolbar class. If you're deploying for 9.3.1 or earlier then I'm not sure what the problem might be. I think someone mentioned that the installer needs elevated permissions in order to run correctly. You can do this by right-clicking the setup.exe and choosing Run as Admin. I'm not at my work computer right now so I can't look at our installers to see what else we may be doing.
... View more
08-15-2011
12:25 PM
|
0
|
0
|
1396
|
|
POST
|
The component category registration code in your toolbar class is registering the toolbar in MxCommands. It should be registering it in MxCommandBars.
... View more
08-15-2011
11:34 AM
|
0
|
0
|
1396
|
|
POST
|
It looks like your code is opening ArcMap (as opposed to running inside of ArcMap). When you do this, you cannot create new instances of any ArcObjects classes using the New keyword. You must use IObjectFactory to create these instances.
... View more
08-12-2011
11:46 AM
|
0
|
0
|
988
|
|
POST
|
You have to implement the ITool.Deactivate method so that it returns True. If you don't, then your tool cannot be de-selected.
... View more
08-12-2011
05:04 AM
|
0
|
0
|
3497
|
|
POST
|
I don't have time right now to run your code but you shouldn't need any events outside of the ITool implementation. I'm attaching a sample sketch tool I created for a blog entry a few years back. You may find something in the code that will help you solve your problem. This tool uses a custom symbol rather than using the default symbol provided by the feedback object. One thing to note is the symbol settings in the method that creates the custom symbol object. There is also code in the ITool.Refresh implementation to refresh the feedback object.
... View more
08-10-2011
06:13 AM
|
1
|
0
|
882
|
|
POST
|
I'm not sure that you're correctly describing what you're doing. An extension is a class that implements IExtension and is registered in the ESRI Mx Extensions component category. An extension will not affect any tools, commands, toolbars, or menus unless you write code inside the class to specifically do that. You mention OnContextMenu. That is a method on the ITool interface. If you are creating a class that implements ITool, then that is a tool not an extension. You use OnContextMenu to provide the user with your own custom context menu for your tool. If you do this, then you need to make sure this method returns a value of True (in addition to displaying your menu). Otherwise, leave the method stub blank (or explicitly return a value of False) to leave the default context menu (if any) in place. If you provide more information about what you're doing, someone might be able to help. You might also want to post your code.
... View more
08-10-2011
05:34 AM
|
0
|
0
|
2387
|
|
POST
|
According to your original code, you are getting a point collection from a path object, updating that point collection, then trying to assign the path object as the feature's shape. You can't do that. A path is not a high level geometry and cannot be used to assign a feature's shape. You need to assign the shape using the original geometry reference you set at the beginning of the code.
... View more
08-09-2011
05:35 AM
|
0
|
0
|
3403
|
|
POST
|
Also, to add to what Richard said, if you're trying to run your dll inside ArcGIS on the same machine you're developing on then you shouldn't have to add from file. The act of compiling the dll inside Visual Studio should perform all of the necessary registration (if you've set everything up correctly) so that when you open ArcMap your tools should already be there.
... View more
08-05-2011
05:32 AM
|
0
|
0
|
1102
|
|
POST
|
Make sure you're formatting the value so that the database can recognize it as a Guid. Here's a method we use to convert the Guid object to a value that can be written to the database. Public Shared Function GuidToDatabase(ByVal value As System.Guid) As Object
If value = System.Guid.Empty Then
Return DBNull.Value
Else
Return "{" & value.ToString & "}"
End If
End Function
... View more
08-05-2011
05:28 AM
|
0
|
0
|
1725
|
|
POST
|
No, the component category registration code is the code that actually registers the class with the component categories. ESRI has a VS addin that will generate this code for you if you have the SDK installed and are using a supported version of VS. Since we develop for 9.3.1 using VS2010 (which is unsupported at 9.3.1) we don't use that addin and instead copy the code from existing classes that were created back when we could use that addin. It is important to make sure this code is registering the class in the correct category. Yes, you can use categories.exe to see what classes have been registered. If your toolbar class is showing up under the Mx CommandBars category, then it is properly registered. If it is showing up under Mx Commands (or another category) then it is registered in the wrong category. If you can't find it at all, then it's not registered.
... View more
08-01-2011
07:00 AM
|
0
|
0
|
1658
|
|
POST
|
It depends on what type of dll it is. For instance, a .NET assembly dll doesn't require registration if you install it alongside the assemblies that reference it. On the other hand, ActiveX dlls usually require registration and typically will not work if you simply install them alongside your application assemblies.
... View more
08-01-2011
06:23 AM
|
0
|
0
|
843
|
|
POST
|
If you have to register that dll then it is required that the user running the registration have read/write permissions on the system registry.
... View more
08-01-2011
05:54 AM
|
0
|
0
|
843
|
| 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
|