Command Line Options
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).
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.
The /UPDATE switch forces VBLM to re-examine the parent VB project and re-extract the strings if required.
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.
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.
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.
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.
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.
The ExtractDimNow switch commands VBLM to extract the dimensions from the specified project and save them in the specified file.
The ApplyDimNow switch commands VBLM to read the dimensions from the specified file and apply them to the specified VB project.
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:
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.
When the /SAVE switch is used, VBLM saves changes before exiting. Otherwise, it does NOT save changes caused by command line operations.
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
Turns extraction of strings from FRX and other binary stash files off and on
Turns extraction of property-section strings only off and on
Toggles honoring of VBLM ON/OFF/SKIP/GET directives off and on
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
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.
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.
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.
Turn version commenting off and on
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.
The VBLMCondComp switch determines whether or not VBLM adds a "VBLM = -1" conditional compiler argument to the project files it builds.
Turn Extract/Apply Dimension Data During Build off and on.
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
FontName = Font name (don't forget the quotes if it has a space in it!)
FontSize = Font size in points
Charset = Character set
GUID = The font GUID is sometimes needed for proper display of multi-byte fonts.
Bold = Bold handling, 0=Don't supply Bold info, 1=Set Bold Off, 2=Set Bold On
MissingOrAll = Supply which fonts, 0=missing only, 1=all
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.
Turn VB Interaction off and on. This replaces the obsolete /NOVB switch
Specify the version of VB to run
Specify the command line to pass to VB. Be sure to enclose it in double quotes.
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
Instructs VBLM whether or not to implement runtime dimension switching while performing an RSV build.
Specify the name opf the language database file (file name only - do not include a path)
Specify language database format: Resource, ANSI Text, or Binary
Specify the name of the design language for RSV builds.
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.
Specify the name of the RSV string replacement function.
Specify the template to use for constructing the argument list passed to the string replacement function.
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.
Turn replacement of all strings, not just untranslated strings, off and on.
Specify the number to use for the string index base.
Specify the number to use for the string index step.
Set the string indexing style: 0=Numeric literal, 1= Simple Constant, 2=Constant from template
Specify the string index template
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.
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.
The SwitchOnTheFly switch determines whether or not VBLM includes the controls and code needed to enable on-the-fly switching between languages and dimsets.
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.
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.
Specify the string used to replace switched properties in the definition section of control-containing project files.
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.
Specify the UserText inserted into import/export files and ANSI text language database files.
Insert the contents of $Filename as UserText into import/export files and ANSI text language database files.
Turns extraction logging off and on, and sets handling of existing log file. 0=off, 1=Overwrite, 2=Append, 3=Query
Turns import logging off and on, and sets handling of existing log file. 0=off, 1=Overwrite, 2=Append, 3=Query
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.
Turns build logging off and on, and sets handling of existing log file. 0=off, 1=Overwrite, 2=Append, 3=Query
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.
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.
The /UNICODE switch enables VBLM's experimental (and unsupported) Unicode capabilities. See VB, VBLM and Unicode for more information.
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.
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.