Samples

Create Polyline Shapefile from Table Sample

Description:

This sample takes two pairs of X, Y coordinates from a dBASE Table and creates a new standalone FeatureClass by creating a Polyline connecting these pairs of coordinates. This sample is intended to be used within the ArcCatalog application.

To run this sample, a dBASE file containing at at least four numeric columns and two other columns is required.
Products:

ArcView: VBA

Platforms: Windows

Minimum ArcGIS Release: 9.0

How to use:

Steps for adding an extension (through Categories.exe):

  1. Start ArcCatalog. Select a dBASE file with fours columns of numeric data to be used as Polyline coordinates. The Table should also contain two other fields which will be copied to the new FeatureClass as attributes of the new Features.
  2. Open the Visual Basic Editor, and paste in the code from the module below.
  3. Change the constants at the start of the code to be the names of the fours columns of numeric data, and the columns to be used as attributes for the new Features.
  4. Run the MakeLineFC macro, ensuring that you have the dBASE file selected in the ArcCatalog TreeView.

VB6
File Description
basMakeLineFC.bas VBA Module containing the code to generate the FeatureClass.


Key CoClasses:Dataset, Fields, FeatureClass, Polyline
Key Interfaces: ITable, IFields, IFieldsEdit, IFeatureWorkspace, ICursor
Key Members:IFields::FindField, IGxApplication::SelectedObject


Feedback Send feedback on this sample