Request a Personalized Demo

Learn how to accurately convert your designs with Scan2CAD

  • This field is for validation purposes and should be left unchanged.
  • Join thousands of happy customers worldwide

Vectorization commands

 

The following raster to vector conversion commands are available for use in a Command File.

 

TypeSettings

RasterLineWidth Line Width (pixels)
LineDevLimit Deviation Factor (pixels)
CornerSnapDistance Corner Snap (pixels)
PassThroLength Pass-Thro Snap (pixels)
GapJumpDistance Gap Jump Distance (pixels)
LooseEndsLength Loose Ends Length (pixels)
ConnectThroNodes Connect Thro Nodes (pixels)
AlignToGridOnVectorise Align to Current Grid (1=ON, 0=OFF)
OCRrun OCR On (1=ON, 0=OFF)
Orthogonal Angle Optimization 90/180 (1=ON, 0=OFF)
OrthoAngleDeviationLimit Angle Optimization 90/180 tolerance (degrees)
Optimise30 Angle Optimization 30 (1=ON, 0=OFF)
Optimise45 Angle Optimization 45 (1=ON, 0=OFF)
Optimise60 Angle Optimization 60 (1=ON, 0=OFF)
Optimise120 Angle Optimization 120 (1=ON, 0=OFF)
Optimise135 Angle Optimization 135 (1=ON, 0=OFF)
Optimise150 Angle Optimization 150 (1=ON, 0=OFF)
AngleDeviationLimit Angle Optimization 30, 45, 60, 120, 135, 150 tolerance (degrees)
IdentifyArcs Identify arcs (1=ON, 0=OFF. If 1, IdentifyBeziers must be 0)
IdentifyBeziers Identify beziers (1=ON, 0=OFF. If 1, IdentifyArcs must be 0)
IdentifyCircles Identify circles (1=ON, 0=OFF)
IdentifyArrowLines Identify arrow lines (1=ON, 0=OFF)
IdentifyDashLines Identify dash and dash dot lines (1=ON, 0=OFF)
PolyRun Identify polylines (1=ON, 0=OFF)
IdentifyHatch90Lines Identify hatch lines at 90 and 180 degrees (1=ON, 0=OFF)
IdentifyHatch30Lines Identify hatch lines at 30 and 150 degrees (1=ON, 0=OFF)
IdentifyHatch45Lines Identify hatch lines at 45 and 135 degrees (1=ON, 0=OFF)
IdentifyHatch60Lines Identify hatch lines at 60 and 120 degrees (1=ON, 0=OFF)
CornerSnapDegreeLimit Corner Snap angle tolerance (degrees)
ArcRadiusMinPixelLimit Arc minimum radius (pixels)
CircleRadiusMinPixelLimit Circle minimum radius (pixels)
ArrowHeadMaxPixelLimit Arrow Line maximum arrowhead length (pixels)
DashLineMaxPixelLimit Dash Line maximum dash length (pixels)
DashGapMaxPixelLimit Dash Line maximum gap length (pixels)
HatchLineDegreeLimit Hatch Line angle tolerance (pixels)

35 arguments.

Sets vectorization settings to the specified values. If you do not specify vectorization settings within the Command File the settings currently set within Scan2CAD will be used.

 

TypeArchitect

No arguments.

Sets vectorization settings to Architectural.

 

TypeElectrical

No arguments.

Sets vectorization settings to Electrical.                

 

TypeMechanical

No arguments.

Sets vectorization settings to Mechanical.

 

TypeCNC

No arguments.

Sets vectorization settings to CNC Profile.

 

TypeSitePlan

No arguments.

Sets vectorization settings to SitePlan.

 

TypeContour

No arguments.

Sets vectorization settings to Contour.

 

TypeSketch

No arguments.

Sets vectorization settings to Sketch.

 

TypeScanline

No arguments.

Sets vectorization settings Scanline.

 

TypeOutline

No arguments.

Sets vectorization settings to Outline.

 

TypeUser

No arguments.

Sets vectorization settings to User.                

 

LoadNeuralNet

NeuralNetworkFileName

One argument.

Loads a Neural Network  file.

Used to load a user-defined neural net file into Scan2CAD. Note: The OCRApplyUserNet argument in OCRSETTINGS  must be set to 1 (Use User Neural Net) for this user-defined neural net to be applied.

The following example code loads the Neural Network file called numbersonly.net:

LOADNEURALNET

c:\users\username\documents\scan2cadv8\nets\ numbersonly.net

 

OCRSettings

OCRCharSizeMax Maximum Character Size Limit (pixels)
OCRCharSizeMin Minimum Character Size Limit (pixels)
OCRRecognitionLimit OCR Recognition Limit (percentage)
OCRSpaceLimit Character Space Limit (number of spaces)
OCRApplyStandardNet Standard Character Set (1=USE. If set to 1, set OCRApplyUserNet to 0)
OCRApplyUserNet User Character Set (1=USE. If set to 1, set OCRApplyStandardNet to 0)
OCRRotation Character Rotation (0, 90, 180 or 270. -1 = Auto)
OCRDisplayMode Always set to 1
OCRSetOptimise Always set to 1
OCRSplitChar Touching Characters – Split (1=ON, 0=OFF)
OCRSplitCharAspectRatio Touching Characters – Aspect Ratio (character width/character height. Typical value 0.7 but may vary between 0.5 and 1.5)

11 arguments.

Sets OCR settings to the specified values. If you do not specify OCR settings within the Command File the settings currectly set within Scan2CAD will be used.

For example:

OCRSETTINGS

54

6

10

4

1

0

0

1

1

0

0.7

 

RunOCR  (or RunOCRRaster)

No arguments.

Executes Run Menu > OCR using the OCR settings specified by the OCRSettings command.

The following example code converts text on a black and white (1 Bit) raster image to OCR’d vector text:

* Set suitable OCR settings

OCRSETTINGS

54

6

10

4

1

0

0

1

1

0

0.7

* Vectorize the image

RUNOCR

 

The following example code converts text on a grayscale or color raster image to OCR’d vector text, ignoring color:

* Make the paper background white

FORCETOWHITE

15

* Set suitable OCR settings

OCRSETTINGS

54

6

10

4

1

0

0

1

1

0

0.7

* Vectorize the image

RUNOCR

 

The following example code converts text on a color raster image to color OCR’d vector text:

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

REDUCECOLORDEPTH8BIT

* Reduce the number of colors used on the image to a level suitable for that image

REDUCECOLORSAUTO4

* Activate Layer Colors

COLORLAYESON

* Set suitable OCR settings

OCRSETTINGS

54

6

10

4

1

0

0

1

1

0

0.7

* Vectorize the image

RUNOCR

 

OCRSplitStringsOnSpace

OCRSPLITSTRINGSONSPACE 1=ON, 0=OFF

1 argument.

OCR Strings will be split into words/numbers whenever a space is encountered following a word/number during an OCR run.

 

RunOCRVector

No arguments.

Executes OCR Menu > OCR Run > Vector using the OCR settings specified by the OCRSettings command.

 

RunVector

No arguments.

Executes Run Menu > Vectorization using the vectorization settings specified by any of the Type commands.

The following example code converts a black and white (1 Bit) raster image to vectors:

* Select suitable vectorization settings

TYPECONTOUR

* Vectorize the image

RUNVECTOR

 

The following example code converts a grayscale or color raster image to vectors, ignoring color:

* Make the paper background white

FORCETOWHITE

15

* Select suitable vectorization settings

TYPECONTOUR

* Vectorize the image

RUNVECTOR

 

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

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

REDUCECOLORDEPTH8BIT

* Reduce the number of colors used on the image to a level suitable for that image

REDUCECOLORSAUTO4

* Activate Layer Colors

COLORLAYERSON

* Select suitable vectorization settings

TYPECONTOUR

* Vectorize the image

RUNVECTOR

 

RunAll

No arguments.

Executes Run Menu > All using the OCR settings specified by the OCRSettings command and the vectorization settings specified by any of the Type commands.

The following example code converts a black and white (1 Bit) raster image to vectors, using OCR to convert text.

* Select suitable vectorization settings

TYPEARCHITECT

* Set suitable OCR settings

OCRSETTINGS

54

6

10

4

1

0

0

1

1

0

0.7

* Vectorize the image

RUNALL

 

The following example code converts a grayscale or color raster image to vectors, ignoring color and using OCR to convert text:

* Make the paper background white

FORCETOWHITE

15

* Select suitable vectorization settings

TYPEARCHITECT

* Set suitable OCR settings

OCRSETTINGS

54

6

10

4

1

0

0

1

1

0

0.7

* Vectorize the image

RUNALL

 

The following example code converts a color raster image to color vectors, using OCR to convert text:

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

REDUCECOLORDEPTH8BIT

* Reduce the number of colors used on the image to a level suitable for that image

REDUCECOLORSAUTO4

* Activate Layer Colors

COLORLAYERSON

* Select suitable vectorization settings

TYPEARCHITECT

* Set suitable OCR settings

OCRSETTINGS

54

6

10

4

1

0

0

1

1

0

0.7

* Vectorize the image

RUNALL

 

BatchSettings

BatchDirectoryNameIn Batch Source folder (folder path)
BatchDirectoryNameOut Batch Destination folder (folder path)
BatchSpeckleRemoval Speckle Removal (1=ON, 0=OFF)
BatchPixelSpeckleSize Pixels Speckle Size (pixels, 1 to 32. Set to 0 if BatchSpeckleRemoval is 0)
BatchHoleRemoval Hole Removal (1=ON, 0=OFF)
BatchPixelHoleSize Pixels Hole Size (pixels, 1 to 32. Set to 0 if BatchHoleRemoval is 0)
BatchThickenLine Thicken Lines (1=ON, 0=OFF)
BatchThickenPixels Thicken Pixels (1=ON, 0=OFF)
BatchMinimumProximityPixels Minimum number of Proximity Pixels (pixels, 1 to 8. Set to 0 if BatchThickenPixels is 0)
BatchSmooth Smooth (1=ON, 0=OFF)
BatchColorSeparation Color Separation (1=ON, 0=OFF)
PDFLoadImages PDF Raster (1=ON, 0=OFF)
PDFLoadVectors PDF Vector (1=ON, 0=OFF)
PDFVectorize Vectorization of PDF Raster (1=ON, 0=OFF)

14 arguments.

Sets up a batch conversion.        

Example code:

BATCHSETTINGS

c:\users\username\documents\scan2cadv8\BatchIn

c:\users\username\documents\scan2cadv8\BatchOut

1

6

1

6

1

1

2        

1

0

0

0

1

 

BatchByDirectory

No arguments.

Runs the batch conversion specified by the BatchSettings command.

 

Have questions on this topic? Talk to us