Local Links

External Links

Contact

Search this site

Arbed - Command (Tool) Operations


Arbed can be asked via the cmdline to perform several operations, which is convenient for batch processing and other automation tasks.

To invoke Arbed on Windows and Linux, it should be straight-forward like with any other command line tool.

On OS X, not the .app bundle but the included executable needs be addressed from the command line, like this:

/Applications/Arbed.app/Contents/MacOS/Arbed -- showDiff ...

Project Comparison

Open two projects and show them in the Comparison window.

Syntax (for comparison):

--showdiff [options] leftPath rightPath

or (for conflict resolving):

--showdiff [options] leftPath rightPath mergedPath

options:

  • -noExternals -- looks only at these two files, without including external classes and modules (option available since v1.4.1). This is effectively the the inverse of the Checkbox titled "Include Externals" in the UI. If this option is not provided, all external code items will be included in the comparison.
  • -showAlerts -- shows any errors via MsgBox (option available since v1.4.1).

Vault export/import

Performs a Vault ex-/import

Syntax:

--export-to-vault [options] path
--import-from-vault path

options:

  • -collectExternals -- stores externals into main vault. Otherwise, they're stored next to their originals (option available since v1.4.1). This is effectively the the inverse of the Checkbox titled "Separate Externals" in the UI: Using this option is equal to unchecking "Separate Externals" in the UI, not providing the option is like checking the box in the UI.
  • -adoptFolders -- adopts folder hierarchy in vault (option available since v1.4.1).
  • -showAlerts -- shows any errors via MsgBox (option available since v1.4.1).

Convert (Project Export) operations

The Main window's Convert operations can be executed via the cmdline.

When invoked this way, Arbed will process this one command and then quit again. If there are errors or warnings, they will be written to stdout. If there were no errors (warnings do not matter), it'll quit with exit code 0, otherwise with a non-zero value (e.g. 1).

Syntax:

command [options] inputPath outputFolderPath outputFileName

Note that output folder and file name are separate arguments, i.e. separated by a space.

command is either:

  • --export-project-xml
  • --export-project-rbp
  • --export-project-rbvx

options:

  • -noExternals -- exports only the main project, excluding any external code items. Without this option externals are included.
  • -xojoNaming -- output files are named in the new Xojo style (.xojo_binary etc.).
  • -rbNaming -- output files are named in the old REAL Studio style (.rbp, .rbo etc.).
  • -noCodeMerge -- external code items are not getting internalized with this option.
  • -externalsFolder= -- consolidates external files into the folder path specified after the "=".
  • -noExternals -- suppresses the processing of external files.
  • -showAlerts -- shows any errors via MsgBox (option available since v1.4.1).

Source Output (Export) operations

To export the project source for documentation and reference purposes, the source code can be exported as plain text or as HTML. Note that this output is not a perfect mirror of all the project's contents, as some information may be missing, such as Project Folders, Control properties, Attributes, Constant conditional variants, and more. You can also export the source to XML, which is more complete but will require you to further process the XML output.

Syntax:

command [options] inputPath outputFolderPath outputFileName

Note that output folder and file name are separate arguments, i.e. separated by a space.

command is either:

  • --export-source-plain
  • --export-source-html
  • --export-source-xml

options:

  • -api (HMTL only, since v1.7.9) -- writes out only the publically accessible identifiers of Modules and Classes.
  • -ascii (HMTL only) -- encodes any non-ASCII char into its HTML code (otherwise those will be written as Unicode chars).
  • -noprologue (HMTL only) -- suppresses writing the HTML header and footer, leaving only the body contents.
  • -showAlerts -- shows any errors via MsgBox (option available since v1.4.1).

Script execution

Runs a script on a project file that gets loaded from disk, and automatically saves the project file if the script modified it. The script may also output text using the "Print" command.

This allows for batch processing of Real Studio project files.

Syntax:

--run-script [options] path-to-script path-to-project

options:

  • -keepBackup -- Keeps the previous file version as a backup by renaming it with an appended "~".
  • -stringConst name value -- Inserts a line to the beginning script: const name = "value". Put the value into quotes if it contains spaces!
  • -numConst name value -- Inserts a line to the beginning script: const name = value

Example commands:

  • c:\ArbedWin\Arbed.exe --run-script -stringConst find "a b c" -stringConst replace def c:\Projects\Test.arbs c:\Projects\Test.rbp
  • /Applications/Arbed.app/Contents/MacOS/Arbed --run-script -stringConst find "a b c" -stringConst replace def /Projects/Test.arbs /Projects/Test.rbp

These would invoke a script that could find the given string "a b d" in the project and replace it with "def".


Page last modified on 2015-03-16, 16:01 UTC (do)
Powered by PmWiki