POST
|
Good day all I have created an toolbar in ArcMap and create few function/button using VBA. This toolbar I need to pass it to my client, is there a way to create an EXE file so my client only need to install the EXE file. any help will do Thank you in advance
... View more
10-25-2011
07:47 PM
|
0
|
1
|
370
|
POST
|
Good day, I found a code in this forum where it is for Attribute Transfer Mapping, it is actually to transfer the attribute from a shapefile to another shapfile. But once i implement the code, and click the button, nothing happen. Bellow is the code. ===================================== Public Sub PutViaAttributeTransfer() 'Copy geometry and attributes from selected features to a target layer 'Define source, target and attributes to be transfered via 'Spatial Adjustment Attribute Transfer Mapping dialog. Dim pMxDoc As IMxDocument Dim pMap As IMap Dim pEditor As IEditor Dim pAttTransType As IAttributeTransferType Dim pAttTrans As IAttributeTransfer Dim pATDS As IAttributeTransferDefaultSettings Dim pSourceFeatLyr As IFeatureLayer2 Dim pTargetFeatLyr As IFeatureLayer2 Dim pFieldMap As IFieldMap Dim pEnumFeat As IEnumFeature Dim pSourceFeature As IFeature Dim pTargetFeature As IFeature Dim bATSucess As Boolean 'Get the doc and Map Set pMxDoc = ThisDocument Set pMap = pMxDoc.FocusMap 'Get the editor Set pEditor = Application.FindExtensionByName("ESRI Object Editor") 'QI for Attribute Transfer Type and get IAttributeTransfer Set pAttTransType = pEditor Set pAttTrans = pAttTransType.AttributeTransfer 'QI for default settings and return source/target layers Set pATDS = pAttTrans Set pSourceFeatLyr = ReturnLayer(pMap, pATDS.SourceName) 'If no mapping set, pSourceFeatLyr will be nothing (null sourcename) so bail If pSourceFeatLyr Is Nothing Then MsgBox "Attribute Transfer field mapping not set" Exit Sub End If 'Get the fieldmap for the source layer Set pFieldMap = pAttTrans.FindFieldMap(pSourceFeatLyr.FeatureClass, Nothing) 'If fieldmap is nothing then warn user If pFieldMap Is Nothing Then MsgBox "Attribute Transfer field mapping not set" Exit Sub End If 'get target feature layer Set pTargetFeatLyr = ReturnLayer(pMap, pATDS.TargetName) 'Check if source and target have same geometry type If Not (pSourceFeatLyr.FeatureClass.ShapeType = pTargetFeatLyr.FeatureClass.ShapeType) Then MsgBox "Source and Target Layer geometries do not match", vbExclamation Exit Sub End If 'Enumerate through each selected feature (source) Set pEnumFeat = pEditor.EditSelection pEnumFeat.Reset Set pSourceFeature = pEnumFeat.Next pEditor.StartOperation Do Until pSourceFeature Is Nothing 'Create a new feature in the target Set pTargetFeature = pTargetFeatLyr.FeatureClass.CreateFeature Set pTargetFeature.Shape = pSourceFeature.ShapeCopy pTargetFeature.Store 'Transfer the attributes If Not (pTargetFeature Is Nothing) Then 'Transfer attributes to the new target feature pAttTrans.Transfer pFieldMap, pSourceFeature, pTargetFeature, bATSucess 'Debug.Print bATSucess End If Set pSourceFeature = pEnumFeat.Next Loop pEditor.StopOperation "PUT" End Sub Private Function ReturnLayer(pMap As IMap, sLayerName As String) As ILayer 'Find a layer in a map document 'Return the layer or nothing if not found Dim pEnumLayers As IEnumLayer Dim pLayer As ILayer Set pEnumLayers = pMap.Layers(Nothing, True) pEnumLayers.Reset Set pLayer = pEnumLayers.Next Set ReturnLayer = Nothing Do Until pLayer Is Nothing If pLayer.Name = sLayerName Then Set ReturnLayer = pLayer Exit Do End If Set pLayer = pEnumLayers.Next Loop End Function ===================================== Do I have to change the code to make it work...? any help will do. Thank you in advance
... View more
07-26-2011
07:59 PM
|
0
|
1
|
721
|
POST
|
Good day, There is a tool in arcmap to transfer attribute, is there a code to Programmatic specify the field to transfer attribute? Any help will do.
... View more
07-26-2011
12:31 AM
|
0
|
0
|
207
|
POST
|
Good day is there a way or a code how display a query result base on a different color. Thank you in advance
... View more
04-25-2011
07:56 PM
|
0
|
1
|
476
|
POST
|
Good day is there a way or a code how display a query result base on a different color. Thank you in advance
... View more
04-25-2011
07:55 PM
|
0
|
1
|
499
|
POST
|
Hi there, Is there any sample that I can refer to make a Query using Combobox in Flex? I am very new in Flex so any help will do. Thank you in advance
... View more
09-28-2010
07:34 PM
|
0
|
3
|
772
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|