Imagix 4D User Guide


Commands

There are several procedures you are likely to want to use as part of a command file:

cmmdOpenProjectto open a project
cmmdUpdateProjectDatato update a project
cmmdRegenerateProjectDatato regenerate a project
cmmdReportto output a report
cmmdReportExportto output a report for future import
cmmdReportMultipleto output multiple reports
cmmdReportExportMultipleto output multiple reports for future import
cmmdMetricsto output metrics
cmmdCalcMetricsto calculate but not output metrics
cmmdDocumentto output a document
cmmdDebugto create a debug trace

cmmdOpenProject project_name

This procedure opens project project_name. project_name must be an already existing project. This is equivalent to the Open Project function (MENU File > Open Project).

cmmdUpdateProjectData

This procedure causes the currently open project to be updated. This is equivalent to the Update Project Data function (MENU Project > Update Project Data).

cmmdRegenerateProjectData

This procedure causes the currently open project to be regenerated. This is equivalent to the Regenerate Project Data function (MENU Project > Regenerate Project Data).

cmmdReport report_name [ file_name ]

cmmdReportExport report_name [ file_name ]

These procedures cause report report_name to be output to the file file_name. When cmmdReportExport is used instead of cmmdReport, the resulting file includes the special data section so that the file can later be imported back into Imagix 4D and appear with all of the symbol names fully tagged for browsing and navigation.

report_name is derived from the name of the report as it appears in MENU Reports. Spaces need to be converted to underscores, and format alternatives need to be separated by two periods. For example, MENU Reports > File Summary becomes File_Summary, and MENU Reports > Source Checks > Expressions > Conversion Issues becomes Source_Checks..Conversion_Issues.

file_name is the full path name of a file. If file_name is omitted, cmmdReport outputs to the file or pipe as was specified in the Print dialog, the last time Imagix 4D was invoked in interactive (normal) mode. In this case, in your command file, you may want to set the variables that control printing before you invoke cmmdReport. These variables correspond to the selections available in the Print dialog. Setting these variables will cause the settings from the previous interactive session to be overwritten.

VariableSettings
vtgPrint(Comment)string
vtgPrint(Output){ ToFile | PipeTo }
vtgPrint(PipeTo)string
vtgPrint(FileName) file_name

For Windows, setting vtgPrint(Output) to PipeTo is equivalent to selecting `To Default Printer' in the Print dialog.

Many of the reports have a number of optional settings. By default, cmmdReport uses the settings from the last time Imagix 4D was invoked in interactive (normal) mode. You can explicitly control these settings in the command file, using the variables listed in the file ../imagix/user/user_cmd.txt.

cmmdReportMultiple [ directory_name [ report_list [ skip_list ]]]

cmmdReportExportMultiple [ directory_name [ report_list [ skip_list ]]]

These procedures cause each specified report to be output to a file in the directory directory_name. When cmmdReportExportMultiple is used instead of cmmdReportMultiple, the resulting files include the special data section so that the files can later be imported back into Imagix 4D and appear with all of the symbol names fully tagged for browsing and navigation.

The name of the output file is generated automatically. If directory_name is omitted, the reports will be output to the reports subdirectory within the directory where the current project (the project opened via cmmdOpenProject) is located.

By default, cmmdReportMultiple runs all reports that appear under the Reports menu. You can limit which specific reports are run through report_list and skip_list. For each report, use the report_name format as specified for cmmdReport. Enclose each list is curly braces, for example {File_Summary Source_Checks..Conversion_Issues}. If you want to generate all reports except those specified in skip_list, use {} or all for the report_list argument.

cmmdMetrics [ directory_name [ symbol_type_list ]]

cmmdCalcMetrics [ symbol_type_list ]

The cmmdMetrics procedure exports symbol metrics into files using a comma-separated values (csv) format. A separate file is created for each type of symbol having a metric.

The name of the output file is generated automatically. If directory_name is omitted, the reports will be output to the metrics subdirectory within the directory where the current project (the project opened via cmmdOpenProject) is located.

The cmmdCalcMetrics procedure calculates, but does not export, symbol metrics. It is an alternative to cmmdMetrics that is only useful when the project size setting for Imagix 4D is set to Very Large, so that the calculated metrics are stored in the database between sessions. (See the section on Project Resources in the User Guide for more info).

By default, both procedures generate metrics for all the metrics categories that appear under the Reports menu. You can limit which metrics files are generated through symbol_type_list. The default value of symbol_type_list, for all six symbol types, is {directory file namespace class function variable}.

cmmdDocument [ directory_name ]

This procedure causes documentation to be generated into the directory directory_name. If directory_name is omitted, output is directed to a directory ( ../project_name.4DD ) based on where the current project (the project opened via cmmdOpenProject) is located.

Document dialog settings are retained between sessions. By default, these are used when generating documentation. If you want to use different settings, you can specify the desired settings in a DocGen sheet, and apply that sheet for the document generation process. The following variables control document settings controlled outside of the DocGen sheets. Certain combinations of Format and File are incompatible, as indicated in the Document dialog.

VariableSettings
dcgOptions(Style){ UseOptionsSettings | ApplyDocGenSheet }
dcgOptions(DocGenSheet)file_name_of_.dgn_file
dcgOptions(Format) { ASCII | RTF | HTML }
dcgOptions(File) { SingleFile | FileperSection | FileperSymbol }

cmmdDebug [ contents [ crashsppt [ tracefile ]]]

This procedure duplicates the debug trace support enabled through the Tools > Options > Behavior and Appearance > Technical Support dialog. The resulting trace file can be useful for refining command files, particularly when used in conjunction with dbgf commands.

contents must be one of the selections from the content selections from the dialog, or Off which is equivalent to disabling the debug trace; it defaults to Essentials. crashsppt must be 0 or 1; it defaults to 1. tracefile must be a file in a currently existing directory; it defaults to the location displayed in the Technical Support dialog.