POST
|
Hi! Does anyone know the code (VBA) of the GIS function "Zoom To Layer"?
... View more
07-22-2010
08:56 AM
|
0
|
2
|
816
|
POST
|
Thank you so much! This is exactly what I was searching for. 🙂
... View more
07-04-2010
12:22 PM
|
0
|
0
|
639
|
POST
|
Hi Duncan! This works fine. Thank you so much. 🙂 My problem is that in this sample you have to select a layer in the TOC and not in a combobox. Unfortunately, I don't know how to find out if the layer behind the selected name is a feature layer, a dBASE table or an excel table. Do you have any idea?
... View more
07-01-2010
10:42 PM
|
0
|
0
|
639
|
POST
|
Hi everyone! I have a ComboBox with all names of the Feature Layers that are listed in the Table of Contents. Furthermore, the ComboBox includes some Standalone Tables. What I want is to open the attribute table of the layer or standalone table which has been selected in the ComboBox. I know the code for feature layers but not for standalone tables. Can anybody help please? Here is the code to open the attribute table of a feature layer: Dim pMxDocument As IMxDocument Dim pLayer As ILayer Dim pUID As New UID Dim pCommandItem As ICommandItem Dim strLayername As String strLayername = ComboBox.value Set pMxDocument = ThisDocument Set pLayer = general.FindLayer(strLayername) pMxDocument.ContextItem = pLayer pUID.value = "esriArcMapUI.FeatureLayerContextMenuItems" pUID.SubType = 4 Set pCommandItem = Application.Document.CommandBars.Find(pUID) pCommandItem.Execute
... View more
06-29-2010
10:09 AM
|
0
|
4
|
3895
|
POST
|
Hello! Is it also possible to export the features into a feature dataset? I wrote the following code but it only works when the features are exported to the database and not into a feature dataset: Dim pMxDocument As IMxDocument Dim pMap As IMap Dim pFeatureLayer As IFeatureLayer Dim pDisplayTbl As IDisplayTable Dim pFeatureClass As IFeatureClass Dim pDataset As IDataset Dim pInDSname As IDatasetName Dim pathExport As String Dim pWorkspaceFact As IWorkspaceFactory Dim pWorkspace As IWorkspace Dim pWorkspaceName As IWorkspaceName Dim pOutDSname As IDatasetName Dim pExportOp As IExportOperation Set pMxDocument = ThisDocument Set pMap = pMxDocument.FocusMap Set pFeatureLayer = pMap.Layer(0) Set pDisplayTbl = pFeatureLayer Set pFeatureClass = pDisplayTbl.DisplayTable Set pDataset = pFeatureClass Set pInDSname = pDataset.FullName pathExport = "E:\Test\Join\database.mdb" Set pWorkspaceFact = New AccessWorkspaceFactory Set pWorkspace = pWorkspaceFact.OpenFromFile(pathExport, 0) Set pDataset = pWorkspace Set pWorkspaceName = pDataset.FullName Set pOutDSname = New FeatureClassName pOutDSname.Name = "Export" Set pOutDSname.WorkspaceName = pWorkspaceName Set pExportOp = New ExportOperation pExportOp.ExportFeatureClass pInDSname, Nothing, Nothing, Nothing, pOutDSname, 0 I don't know what to change... 😞
... View more
06-14-2010
11:00 AM
|
0
|
0
|
704
|
POST
|
Hi! I joined a dBASE file to a feature class (JoinTableToLayer) and would like to use "Export Data" command to get a new feature class that contains all the columns and all features. Does anyone know the code? Thanks!
... View more
06-11-2010
11:39 AM
|
0
|
0
|
268
|
POST
|
Hello, I would like to insert the values of a row of an attribute table into an array. I know how to do this manually: Dim myArray() myArray= Array("21621", "21612", "21624", .....) But I was wondering if you can use a loop to get the values automatically (using VBA). Can anybody help? Thanks!
... View more
05-27-2010
10:13 AM
|
0
|
1
|
776
|
POST
|
Hi, thanks to your description I got the full path of some feature classes in a feature dataset. I need it to split polygons at each vertex in order to calculate the centroid points of the lines afterwards (using VBA). The tool "split line at vertices" requires an input feature class (the geometry that will be split) and an output feature class (both as path names). With shapefiles it works without any mistakes. But with feature classes in a feature dataset I get errors. Same problem with other tools that require a path name... Can anybody help? Thanks
... View more
05-17-2010
01:58 AM
|
0
|
0
|
493
|
POST
|
Hi, for several buildings I have determined the central point of the building edges and saved those in a point feature class. Marked by red dots in the graphic. There are also road axes in the graphic marked by black lines which are saved in a line feature class. My goal is to find the shortest connection between one central point of the building edges and the road axes. The connection line between the building edges and the road axes marked in green and the connection point on the road marked in blue will be saved in feature classes. I want to automate the following processes, can somebody help: - determine the central point (red) of each building which is nearest to the road (black) - determine for each found central point (red) the point on the road axes (blue) which marks the shortest line connection and save these points in a point feature class - connect these points, each red point with the accompanying blue point, through a line and save these in a line feature class I work with ArcMap 9.3 and want to realize the automatization of the problem with VBA (version 6.5). If anybody can provide a solution for my problem or even only part of the problem I would be very grateful. Carolin
... View more
05-09-2010
04:36 AM
|
0
|
0
|
1005
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|