VBLM can be almost completely driven from the command line via numerous switches. These options, along with the use of command files, make VBLM's capabilities available for batch processing and automation.

Note 1: Any string argument passed on the command line MUST be enclosed in double quotes (ASCII 34) if it includes spaces. This includes filespecs, font names, command lines, etc. If you pass an unquoted string with spaces, VBLM is apt to engage in some genuinely bizarre behavior.

Note 2: The order in which switches appear on the command line can be important. For details, see the discussion of command file processing.

VBLM recognizes the following command line switches (those marked with an asterisk are new or modified in V6).

Action Switches

FILE NAME [VBProject.VBP | VBLMProject.LMP]

If started with the name of a VB project file on the command line, VBLM runs against it and extracts the strings using the default SX options, to create a new LMP file.

If started with the name of a VBLM project file (*.lmp) on the command line, VBLM loads it.

What VBLM does after creating/loading the LMP file depends on the other command line args supplied. If none are supplied, VBLM waits for you to tell it what to do next.

/UPD

The /UPDATE switch forces VBLM to re-examine the parent VB project and re-extract the strings if required.

/IMP=Table1|File1,Table2|File2

Import File1 into Language Table 1, File 2 into Table 2, etc. The filespecs should include complete paths. Each table name and file name must be separated by the bar character (ASCII 124), and each Table|File pair must be separated by commas.

*/IMP=File1,File2 [Alternate syntax]

Import the files into tables determined by the same algorithm used when you drag and drop an LMX file on the main window. The filespecs should include complete paths. Specify as many files as you want, separating each with a comma.

/EXP=Table1|File1,Table2|File2

Export Language Table 1 to File1, Table 2 to File 2, etc. The filespecs should include complete paths. Each table name and file name must be separated by the bar character (ASCII 124), and each Table|File pair must be separated by commas.

/BUI

The /BUILD switch causes VBLM to perform a build on the LMP file it has either loaded or created. It uses the build options stored in the LMP file, unless they have been overridden by other command line switches. When the /BUILD switch is used, VBLM runs without interruption.

Note: Previous versions of VBLM would terminate after performing a build. It no longer does; use the /CLO switch instead.

/BLDB

The /BLDB switch causes VBLM to build a language database for the LMP file it has either loaded or created. It uses the language selections and database format stored in the LMP file, unless they have been overridden with other command line switches.

*/SFN=VBProjectFileSpec

The SupplyFontNow switch commands VBLM to supply fonts to the specified VB project. If the /FNT=FontInfo spec is also used (described below), VBLM supplies the font info specified. If not, VBLM supplies the font info currently specified in VBLM.

*/EDN=VBProjectFileSpec, DimFileSpec

The ExtractDimNow switch commands VBLM to extract the dimensions from the specified project and save them in the specified file.

*/ADN=VBProjectFileSpec, DimFileSpec

The ApplyDimNow switch commands VBLM to read the dimensions from the specified file and apply them to the specified VB project.

*/CDD=SourceFile,TargetFile,Specs

The CreateDimensionDataSet switch commands VBLM to create a new set of runtime-switchable interface dimensions (a "dimset") by applying the specs to the source file.

SourceFile is the filespec of either a VB project or a dimset file (*.bdd)

TargetFile is the new dimset file that will be created

Specs=FormLeft,FormTop,FormWidth,FormHeight,ControlLeft,ControlTop,ControlWidth,ControlHeight, where each entry is a whole number indicating the percent change that should be made to the original dimensions. For example, the following would result in a dimset in which the form origins were unchanged, the forms were 10% wider and 5% taller, the control lefts increased by 10, the control tops increased by 5%, the control widths increased by 10%, and the control heights remained unchanged:

/CDD=Source,Target,0,0,10,5,10,5,10,0

/CP=NewParentVBProjectPathAndFileName

The /CP ChangeParent switch changes the VB project referenced by the currently loaded LMP file from the original to the one specified. The /CP switch always causes VBLM to also perform an update.

/SAV

When the /SAVE switch is used, VBLM saves changes before exiting. Otherwise, it does NOT save changes caused by command line operations.

/CLO

The /CLOSE switch causes VBLM to terminate when all other switches have been processed. Hats off to Andy Maggs for suggesting this (and other) switches!

String Extraction Properties

/FRX=0/1

Turns extraction of strings from FRX and other binary stash files off and on

/PSO=0/1

Turns extraction of property-section strings only off and on

/TOG=0/1

Toggles honoring of VBLM ON/OFF/SKIP/GET directives off and on

/XFA=0/1

The StringExclusionListFileNoAsk switch determines, when VBLM finds a string exclusion list file in the project directory, whether or not it stops and asks if you want to apply it. It will not ask if /XFA=1

Build Properties

/LT=Language1,Language2...LanguageN

The /LT (language table) switch selects existing language tables and/or forces VBLM to create new ones. If the specified language table(s) exist, VBLM selects them for use (only the first for building new single language exes, all listed for runtime-switched ones). If they don't exist, VBLM creates them. If a name is Test, Design, Enumerate or PigLatin, VBLM fills them in automatically. Multiple languages must be comma-delimited, with no spaces.

/TD=TargetDirectory

The argument following the /TD switch overrides the target directory in the LMP file and instructs VBLM to place command-line builds in the specified directory.

Note: VBLM will dealias the supplied spec.

/PRJ=NameofProjectToBuild

Specify the name of the localized VBP file to build

/SLV or /RSV

The /SLV switch instructs VBLM to ignore the setting in the LMP file and build a single-language executable. The /RSV switch instructs VBLM to ignore the setting in the LMP file and build a runtime switched version.

/CMT=0/1

Turn version commenting off and on

*/SAC=0/1

The StringsAsComments switch causes replaced strings to be appended as a comment to the line of code in which they have been replaced.

Note: As of V6, this applies to both types of builds. Previous versions only applied it to RSV builds.

/VCC =0/1

The VBLMCondComp switch determines whether or not VBLM adds a "VBLM = -1" conditional compiler argument to the project files it builds.

/DIM=0/1

Turn Extract/Apply Dimension Data During Build off and on.

/FNT=0/1

Turn Supply Font During Build off and on, uses current supplied font specs

*/FNT=FontName,FontSize,CharSet,GUID,Bold,MissingOrAll,CommentOrRemove [Alternate Syntax]

Turn Supply Font During Build on, use supplied font specs, where

image\DOT_SM.gif FontName = Font name (don't forget the quotes if it has a space in it!)

image\DOT_SM.gif FontSize = Font size in points

image\DOT_SM.gif Charset = Character set

image\DOT_SM.gif GUID = The font GUID is sometimes needed for proper display of multi-byte fonts.

image\DOT_SM.gif Bold = Bold handling, 0=Don't supply Bold info, 1=Set Bold Off, 2=Set Bold On

image\DOT_SM.gif MissingOrAll = Supply which fonts, 0=missing only, 1=all

image\DOT_SM.gif CommentOrRemove = Handling of overwritten font info, 0=comment out, 1=remove

Note: Unused or 0 value params can be left blank, and no trailing commas are needed.

/VBI=0/1

Turn VB Interaction off and on. This replaces the obsolete /NOVB switch

/VBV=3/416/432/5/6

Specify the version of VB to run

/VBC="VBCommandLine"

Specify the command line to pass to VB. Be sure to enclose it in double quotes.

*/MINV=0/1

Specify whether VBLM will minimize itself when it shells VB to compile. After doing so, VBLM stays minimized until VB closes.

Build Properties, RSV Only

*/DSW=0/1

Instructs VBLM whether or not to implement runtime dimension switching while performing an RSV build.

/LDN=LanguageDatabaseFilename

Specify the name opf the language database file (file name only - do not include a path)

/LDF=R/A/B

Specify language database format: Resource, ANSI Text, or Binary

/DLN=DesignLanguageName

Specify the name of the design language for RSV builds.

*/SF=SupportFilename

Specify a file to add during builds for runtime switching support. The filespec should include a complete path. This switch supplants the /SF support form file and /SM support module switches used in previous versions of VBLM. Use multiple /SF switches on a single command line to specify multiple files.

/FNC=SupportFunctionName

Specify the name of the RSV string replacement function.

/FAT=FunctionArgTemplate

Specify the template to use for constructing the argument list passed to the string replacement function.

/RFT=ResourceFileTemplate

Specify the resource file to use as a template. The filespec should include a complete path.

/RCL="Resource Compiler Command Line"

Specify the command line to pass to the resource compiler when building a resource-format language database. Be sure to enclose it in double quotes.

/RAS=0/1

Turn replacement of all strings, not just untranslated strings, off and on.

/SXB=StringIndexBase#

Specify the number to use for the string index base.

/SXS=StringIndexStep#

Specify the number to use for the string index step.

/SIS=0/1/2

Set the string indexing style: 0=Numeric literal, 1= Simple Constant, 2=Constant from template

/SIT=StringIndexTemplate

Specify the string index template

/DDS=Table1|File1,Table2|File2...TableN|FileN

Use the DimDataSource switch to specify the dimsets that VBLM should associate with each language table when runtime switching of interface dimensions is implemented.

The /DSS switch associates the dimset stored in File1 with Language Table 1, File 2 with Table 2, etc. The filespecs should include complete paths. Each table name and file name must be separated by the bar character (ASCII 124), and each Table|File pair must be separated by commas.

/DDS=File1,File2...FileN [Alternate Syntax]

Associate the dimset stored in File1 with the table with same name as File1 without the extension, File 2 with the table with same name as File2, etc. For example, German.bdd will be associated with the German table.The filespecs should include complete paths. Specify as many files as you want, up to the number of language tables, separating each with a comma.

/DSO=FormOrigin,FormSize,ControlOrigin,ControlSize,Hide

The DimSwitchingOptions switch determines the runtime-switching dimension code that gets written to each control-containing project file. Each parameter to this switch is 0/1, with the following effects:

To consider the first 4 params (FormOrigin to ControlSize), realize that the dimension-switching code is essentially .Move statements for each form and control in the project, and that the *Origin params affect the first two args passed to the .Move statements while the *Size params affect the last two. Thus when FormOrigin is 1, each file's .Move statement is passed coordinates from the dimset for the first two args, and when FormOriginset to 0, each file's .Move statement is passed its current Left and Top coordinates. Ditto for the controls.

When the Hide param is 1, each visible file is hidden while it and its controls are resized, and is then redisplayed. When 0, each file remains visible during the resizing process.

/FLY=0/1

The SwitchOnTheFly switch determines whether or not VBLM includes the controls and code needed to enable on-the-fly switching between languages and dimsets.

/ULDB=0/1

Applicable only to VBLM projects based on program groups instead of individual projects, the UnifiedLanguageDataBase switch determines whether VBLM creates a single language database for the group, or one language database for each project in the group.

/USCF=0/1

Applicable only to VBLM projects based on program groups instead of individual projects, and when the string indexing style is set to 1 or 2, the UnifiedStringConstantFile switch determines whether VBLM creates a single string index constant file for the group, or one for each project in the group.

/FDS="FormDefReplacementString"

Specify the string used to replace switched properties in the definition section of control-containing project files.

/TCN=TriggerControlName

Specify the name to give the label control that VBLM adds to control-containing project files when configured to support on-the-fly language switching.

/UHT="User Text"

Specify the UserText inserted into import/export files and ANSI text language database files.

/UHT="$FileName"

Insert the contents of $Filename as UserText into import/export files and ANSI text language database files.

Logging

/XLOG=0/1/2/3

Turns extraction logging off and on, and sets handling of existing log file. 0=off, 1=Overwrite, 2=Append, 3=Query

*/ILOG=0/1/2/3

Turns import logging off and on, and sets handling of existing log file. 0=off, 1=Overwrite, 2=Append, 3=Query

/ULOG=0/1/2/3

Turns update logging off and on, and sets handling of existing log file. 0=off, 1=Overwrite, 2=Append, 3=Query. This replaces the obsolete /LGU switch.

/BLOG=0/1/2/3

Turns build logging off and on, and sets handling of existing log file. 0=off, 1=Overwrite, 2=Append, 3=Query

Miscellany

/NOS

The /NOSTOP switch causes VBLM to provide default answers to any/all dialogs: it guarantees that VBLM will perform any command line actions without stopping. The /BUILD switch also turns on /NOSTOP.

/SIL

The /SILENT switch commands VBLM to remain invisible and silent while processing commands. There are probably some situation that can occur that will override it and force VBLM to request attention, but they should be rare.

/UNI

The /UNICODE switch enables VBLM's experimental (and unsupported) Unicode capabilities. See VB, VBLM and Unicode for more information.

/INI=INIPathandFileName

By default, VBLM stores and retrieves option settings using the initialization file located in the directory where it is installed (single user version) or in the local windows directory (multi-user). The /INI switch, however, lets you override this behavior by telling VBLM to use a different file and/or directory. This option is most useful if you are installing a multi-user licensed version on a network and want individual users to be able to maintain their own configurations.

Note: When using the /INI switch, the file name given MUST include a full path.

/CDF=CommandFile

If CommandFile exists, VBLM will read it and use all command line switches contained on all lines in the file. This gets around the ~160 character command line length limitation. Hats off to Martin Sperlich who a) found and identified the problem, and b) suggested this solution.

Note 1: When the /CDF switch is used, VBLM V6+ still processes other switches on the command line. Prior versions of VBLM disregarded any other switches on the command line. Hats off to Larry Gajdos for suggesting this (among many other things).

Note 2: Also as of V6, command files can contain more than just commands. See command file processing for more information.

Obsolete Switches

/XPH=ExcludedStringPlaceHolder