B
Barry
I have imported my sample (.vbs) script into Access' Visual Basic
Editor, and ran as is (see script below post). Errors came up...the first
of which stated "Compile error: Invalid outside procedure", so I looked
it up in the Help section and added "Property" to second line (of the
actual script, under header), and ran again...then an error stated
"Compile error: Argument required for Property Let or Property Set", but I
did not understand this Help section. The "=" was highlighted on the
second line of script, in this instance.
Can anyone please look at my sample script below and help me to adjust
so that I can run the outside process from within Access (2003)?
Script starts below:
'
---------------------------------------------------------------------------
' TabletoFeatureClass.vbs
' Created on: Tue Jan 22 2008 12:22:58 PM
' (generated by ArcGIS/ModelBuilder)
'
---------------------------------------------------------------------------
' Create the Geoprocessor object
set gp = WScript.CreateObject("esriGeoprocessing.GPDispatch.1")
' Load required toolboxes...
gp.AddToolbox "D:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data
Management Tools.tbx"
' Local variables...
Well_test = "D:\test\Well_Annotation.mdb\Well_test"
XYWells = "D:\test\Well_Annotation.mdb\XYWells"
XYWells_end = "D:\test\Well_Annotation.mdb\XYWells_end"
XYWells_Layer = "XYWells_Layer"
' Process: Copy Rows...
gp.CopyRows_management Well_test, XYWells, ""
' Process: Make XY Event Layer...
gp.MakeXYEventLayer_management XYWells, "EASTING", "NORTHING",
XYWells_Layer,
"PROJCS['NAD_1983_StatePlane_Texas_North_FIPS_4201_Feet',GEOGCS['GCS_North_American_1983',DATUM['D_North_American_1983',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Lambert_Conformal_Conic'],PARAMETER['False_Easting',656166.6666666665],PARAMETER['False_Northing',3280833.333333333],PARAMETER['Central_Meridian',-101.5],PARAMETER['Standard_Parallel_1',34.65],PARAMETER['Standard_Parallel_2',36.18333333333333],PARAMETER['Latitude_Of_Origin',34.0],UNIT['Foot_US',0.3048006096012192]];IsHighPrecision"
' Process: Copy Features...
gp.CopyFeatures_management XYWells_Layer, XYWells_end, "", "0", "0",
"0"
Editor, and ran as is (see script below post). Errors came up...the first
of which stated "Compile error: Invalid outside procedure", so I looked
it up in the Help section and added "Property" to second line (of the
actual script, under header), and ran again...then an error stated
"Compile error: Argument required for Property Let or Property Set", but I
did not understand this Help section. The "=" was highlighted on the
second line of script, in this instance.
Can anyone please look at my sample script below and help me to adjust
so that I can run the outside process from within Access (2003)?
Script starts below:
'
---------------------------------------------------------------------------
' TabletoFeatureClass.vbs
' Created on: Tue Jan 22 2008 12:22:58 PM
' (generated by ArcGIS/ModelBuilder)
'
---------------------------------------------------------------------------
' Create the Geoprocessor object
set gp = WScript.CreateObject("esriGeoprocessing.GPDispatch.1")
' Load required toolboxes...
gp.AddToolbox "D:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data
Management Tools.tbx"
' Local variables...
Well_test = "D:\test\Well_Annotation.mdb\Well_test"
XYWells = "D:\test\Well_Annotation.mdb\XYWells"
XYWells_end = "D:\test\Well_Annotation.mdb\XYWells_end"
XYWells_Layer = "XYWells_Layer"
' Process: Copy Rows...
gp.CopyRows_management Well_test, XYWells, ""
' Process: Make XY Event Layer...
gp.MakeXYEventLayer_management XYWells, "EASTING", "NORTHING",
XYWells_Layer,
"PROJCS['NAD_1983_StatePlane_Texas_North_FIPS_4201_Feet',GEOGCS['GCS_North_American_1983',DATUM['D_North_American_1983',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Lambert_Conformal_Conic'],PARAMETER['False_Easting',656166.6666666665],PARAMETER['False_Northing',3280833.333333333],PARAMETER['Central_Meridian',-101.5],PARAMETER['Standard_Parallel_1',34.65],PARAMETER['Standard_Parallel_2',36.18333333333333],PARAMETER['Latitude_Of_Origin',34.0],UNIT['Foot_US',0.3048006096012192]];IsHighPrecision"
' Process: Copy Features...
gp.CopyFeatures_management XYWells_Layer, XYWells_end, "", "0", "0",
"0"