|
POST
|
You cannot compile VBA code, so no you can't do that. If you want to distribute VBA to someone else then you will need to give them an ArcMap project or template that contains the code (or manually copy your code into their environment).
... View more
10-26-2011
05:58 AM
|
0
|
0
|
658
|
|
POST
|
You must recompile your application under ArcGIS 10. 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/
... View more
10-26-2011
05:55 AM
|
0
|
0
|
832
|
|
POST
|
Here's how I do it: m_scene.SceneGraph.Invalidate(m_sceneLayer, True, False)
m_scene.SceneGraph.ActiveViewer.Redraw(False)
... View more
10-24-2011
12:42 PM
|
0
|
0
|
806
|
|
POST
|
ArcObjects really doesn't have great support for advanced querying. You may want to look into querying the database directly using ADO or something like that. Of course if your data is not in a database such as Access, SQL Server, or Oracle you can't do that and if your query depends on the feature geometry then that limits you as well. For one-to-many relationships in ArcObjects you would need to use a Relate instead of a Join. You can access related objects through IRelationshipClass.GetObjectsRelatedToObject and other similar methods on the interface. If you're looking to create a table to store query results you might be able to do that using IWorkspace.ExecuteSQL but I've never tried it.
... View more
10-20-2011
01:12 PM
|
0
|
0
|
760
|
|
POST
|
You join multiple tables to a layer the same way you join a single table to a layer except you need to use a reference to the layer's DisplayFeatureClass instead of FeatureClass. There is a VB6 example in the developer help topic for IDisplayRelationshipClass. The call to the Open method would need to be modified to use IGeoFeatureLayer.DisplayFeatureClass. Call this code for each table you want to join. You might also have to fully qualify the feature class field name after the first join has been performed. Note the order of the Open method's parameters. The Table reference and its key field are passed in first followed by the DisplayFeatureClass reference and its key field. If you pass them in backwards the join will not work and you will most likely get a draw error in ArcMap. Furthermore, ArcMap doesn't fully support one-to-many relationships. If there is more than one match in the table for a feature in the feature class then only the first match will be included in the join (this is because the feature class table can only have one row per feature). Note, if you already have relationship classes defined for joining each table to the feature class then you should be able to simply call IDisplayRelationshipClass.DisplayRelationshipClass for each one.
... View more
10-20-2011
11:23 AM
|
0
|
0
|
760
|
|
POST
|
Call IActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint() to convert screen units to whatever units your active view reference is using.
... View more
10-20-2011
11:12 AM
|
0
|
0
|
647
|
|
POST
|
I'm not exactly sure. We haven't made the upgrade to 10 yet as we are still waiting on clients. I've upgraded several of our apps for internal testing. They were compiled on a machine with ArcGIS Desktop 10 installed with no service packs. I've installed one of them on a machine w/ SP2 and it appears to run fine. My guess is that the build number is ignored when determining version (i.e. 1.0.0.1000 and 1.0.0.2000 are both version 1.0.0) but I haven't seen this documented by Microsoft anywhere.
... View more
10-18-2011
06:55 AM
|
0
|
0
|
975
|
|
POST
|
The SpecificVersion property is just a build directive for the Visual Studio compiler. It causes the latest version of an assembly that can be found to be loaded when you compile. It doesn't have any effect on your assemblies at runtime. Your assemblies will require the version of a dependency that was used to compile them. The exception to this is the presence of a policy assembly for the dependency to point your assembly to a newer version of the dependency. ESRI did not supply policy assemblies at version 10. I don't know if this is going to be the case for 10.1 but unless they do you will need to recompile against the newer version.
... View more
10-18-2011
06:17 AM
|
0
|
0
|
975
|
|
POST
|
I haven't done any work with ArcGIS 10 yet as our clients haven't upgraded so I may be wrong but I would think you would check the geometry type being edited inside your tool's Enabled event and set it accordingly. At ArcGIS 9.3.1 and earlier you could check the editor's target layer to see what type of features it contains.
... View more
10-13-2011
05:45 AM
|
0
|
0
|
1603
|
|
POST
|
Uninstalling the application from the Control Panel should unregister the COM classes. The deployment project should have a custom action on both Install and Uninstall to run the component registration code in each COM class. Sometimes this custom action breaks if your project output has changed so give it a look to make sure it's there and valid.
... View more
10-10-2011
12:55 PM
|
0
|
0
|
1108
|
|
POST
|
I'm also experiencing some strange issues lately and one of the things that I found was that when Visual Studio creates the .msi file it is putting the step to uninstall the previous version at the end of the install sequence. So, in other words, it is installing the application then removing the previous version which results in files being missing. Using Orca I have to change the install sequence every time I rebuild the installer.
... View more
10-10-2011
08:01 AM
|
0
|
0
|
1108
|
|
POST
|
If the dll has been registered on your machine you can look it up in the registry. You can also use the ProgId of the command instead of the GUID. The ProgId is the library name and the class name separated by a period (i.e. esriCarto.FeatureLayer). You can find these names by adding the dll as a reference to your VBA project and using the object browser.
... View more
10-05-2011
11:36 AM
|
0
|
0
|
1980
|
|
POST
|
I downloaded the dll and looked at it in the Visual Studio object browser. It appears to contain a single class - the command class that you can use in ArcMap. It doesn't appear to have any public methods exposed other than those on the ICommand interface. It looks like what you are trying to do is not possible with this dll.
... View more
10-05-2011
08:55 AM
|
0
|
0
|
1980
|
|
POST
|
In your Declare statement the first parameter is of type IFeatureClass. When you call the method in your code the first parameter you're passing in is of type IFeatureLayer. That's a type mismatch - IFeatureClass and IFeatureLayer are not the same type.
... View more
10-05-2011
05:36 AM
|
0
|
0
|
1980
|
|
POST
|
If the code inside the dll displays a window then simply calling it from VBA will not change that. What you can and can't do all depends on what is in the dll. If the dll contains object classes then you can use those classes by referencing the dll in the VBA project. If the dll contains public methods then you can call those methods by adding a Declare statement for each method inside your VBA project.
... View more
10-03-2011
05:22 AM
|
0
|
0
|
1980
|
| 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
|