Latest Tutorials ...

Save geometry data to ESRI shape(SHP) files
Save geometry data to ESRI shape(SHP)...
Load and display vector data like ESRI Shape files or DGN, DXF files
Load and display vector data like ESR...
Let the user edit existing geometry objects
Let the user edit existing geometry o...
Let the user draw new geometry objects like Polygons, Lines, Points
Let the user draw new geometry object...
Viewing pictures in a viewer control designed for scrolling, zooming, panning
Viewing pictures in a viewer control ...
Handling Exif and IPTC image tags
...
Extract all pictures of a page
...
Generate PDF documents containing text and imagedata
Generate PDF documents containing tex...
Convert between different image formats
Convert between different image forma...
Download THBImage image and vector viewing and processing SDK
Download THBImage image and vector viewing and processing SDK

THBImage Viewer is a small and fast raster picture and vector data viewer.
THBImage Viewer is a small and fast raster picture and vector data viewer.

Save geometry data to ESRI shape(SHP) files

You can use this code to write each layer of the THBVector object to shape files.

spVector.LoadFromFile(strFileName, thbvfAutoDetect)
Dim arLayers As THBArrayString 
Set arLayers = spVector.Layers.LayerNames
for nLayer=0 to arLayers.Size-1
	strOutFileName = strPathTmp + strName + "_" + arLayers.At(nLayer) + ".SHP"
	spVector.FileFormatSettings.SHPWriteLayer = arLayers.At(nLayer)
	spVector.SaveToFile(strOutFileName, thbvfShape)
Next

You can use this code to write all layers of THBVector object to shape files. spVector.LoadFromFile(strFileName, thbvfAutoDetect) spVector.FileFormatSettings.SHPWriteLayer = ”” spVector.SaveToFile(strOutFileName, thbvfShape) SHPWriteLayer specifies which layer you’d like to write out. If you set it to an empty string it will write out all layers, each layer into a separate shapefile, assigning different names to the output file.