![]()
The following raster to vector conversion commands are available for use in a Command File.
TypeSettings
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.
TypeArchitectNo arguments. Sets vectorization settings to Architectural.
TypeElectricalNo arguments. Sets vectorization settings to Electrical.
TypeMechanicalNo arguments. Sets vectorization settings to Mechanical.
TypeCNCNo arguments. Sets vectorization settings to CNC Profile.
TypeSitePlanNo arguments. Sets vectorization settings to SitePlan.
TypeContourNo arguments. Sets vectorization settings to Contour.
TypeSketchNo arguments. Sets vectorization settings to Sketch.
TypeScanlineNo arguments. Sets vectorization settings Scanline.
TypeOutlineNo arguments. Sets vectorization settings to Outline.
TypeUserNo arguments. Sets vectorization settings to User. LoadNeuralNetNeuralNetworkFileName 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
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
1 argument. OCR Strings will be split into words/numbers whenever a space is encountered following a word/number during an OCR run.
RunOCRVectorNo arguments. Executes OCR Menu > OCR Run > Vector using the OCR settings specified by the OCRSettings command.
RunVectorNo 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
RunAllNo 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
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
BatchByDirectoryNo arguments. Runs the batch conversion specified by the BatchSettings command.
|
Vectorization commands
Have questions on this topic? Talk to us