Vector editing commands

 

The following vector editing commands are available for use in a Command File.

 

MakePolylines

No arguments.

Makes polylines in the currently loaded vector image.

 

UnMakePolylines

No arguments.

Splits polylines and unfilled polygons in the currently loaded vector image.

 

ChangeVectorColorsToRasterColors

No arguments.

Changes the color of vectors to the color of the raster image beneath.

ChangeVectorColorsToRasterColors can be used to convert a color raster image to color vectors. However, you will normally get better results if you do this using the ColorLayersOn command – see vectorize a color image to color vectors.

Before using ChangeVectorColorsToRasterColors:

Use one of the ReduceColorDepth commands to reduce color depth to 8 Bit or less.
Use the UnMakePolylines command to split any polylines (you can remake them later using the MakePolylines command).

The following example code converts a color raster image to color vectors:

* Load the raster image map.tif

LOADRASTER

c:\users\username\documents\scan2cadv8\samples\map.tif

* Reduce the color depth of the raster image to 256 colors

REDUCECOLORDEPTH8BIT

* Make the paper background white

FORCETOWHITE

15

* Select suitable vectorization settings

TYPECONTOUR

* Vectorize the image

* Layer Colors have not been activated, so color vectors will not be produced

RUNVECTOR

* For best results using ChangeVectorColorsToRasterColors

* you need to split any polylines first

UNMAKEPOLYLINES

* Change vector colors to match the raster colors beneath

CHANGEVECTORCOLORSTORASTERCOLORS

* Remake the polylines

MAKEPOLYLINES

* Save the vectors as map.dxf

SAVEVECTOR

* Exit Scan2CAD

EXIT

 

RotateVector

Degrees

One argument.

Rotate the currently loaded vector image by the number of Degrees you specify. If you enter a positive angle, the image will be rotated in a clockwise direction. If you enter a negative angle, it will be rotated in an anti clockwise direction.

The following example code rotates the vector image clockwise by 90 degrees:

ROTATE

90

 

ScaleVector

XScaleFactor If set to 1, the scale in the X direction will not be changed.
YScaleFactor If set to 1, the scale in the Y direction will not be changed.

Two arguments.

Scales the currently loaded vector image vertically and/or horizontally.

The following example code scales the vector image by a factor of 2 in both the X and Y directions:

SCALEVECTOR

2

2

 

 

Have questions on this topic? Talk to us