HOW TO
Create VBA code with the ESRI Arcedit or Arcplot ODE control and the 'ESRIutil automation server' reference. Then run the AML through the Command method of the Arcedit or Arcplot object.
From the Insert menu click Components.
Check the ESRI Arcedit, ESRI Arcplot, or ESRI Grid control.
On the VBA editor Tools menu, click References.
Check "ESRIutil automation server".
From the Insert menu, select UserForm.
Right click on the ToolBox to open the Additional Controls dialog box.
Note:
In ArcMap or ArcCatalog, this this may be Normal > Arcmap Objects > ThisDocument. ArcMap document code can also be added to Project > ArcMap Objects > ThisDocument.
Code:
'This subroutine is linked to a UIButtonControl
'added to the ArcMap or ArcCatalog interface.
Private Sub UIButtonControl2_Click()
Load UserForm1
Unload UserForm1
End Sub
Code:
'The Arcplot control is used in this example.
Private Sub UserForm_Initialize()
Dim Results As ESRIutil.Strings
Dim ArcStatus As Long
Set Results = New ESRIutil.Strings
Results.Clear
ArcStatus = Arcplot1.Command("&run c:\testdata\demo.aml", Results)
Dim i As Integer
Results.Clear
End Sub
Article ID:000002294
Get help from ArcGIS experts
Download the Esri Support App