Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > Automatic Code Synchronizer(ACS) > Generating code files through a batch file > Overview of generating code through a batch file (ACS)
  
Overview of generating code through a batch file (ACS)
Automatic Code Synchronizer has a command line interface that allows you to generate code from saved Comfiles. A Comfile saves the generation settings that are set on the Launch ACS/TDK dialog.
You can use the command line to start a generation in your absence, for example, by running the command line overnight through the AT command under Windows. You can create a DOS batch file that contains one or more command lines to generate code from different models.
You create a Comfile through the Launch ACS/TDK dialog. After setting all the options on the Launch ACS/TDK dialog, you specify the following parameter in the Launch Options box:
-DROP_COMFILE:<path and name of Comfile>.
For example, the following text in the Launch Options box will create a Comfile named MyComfile.drp in the C:\Comfiles folder:
-DROP_COMFILE:C:\Comfiles\MyComfile.drp
When you click the Save and Launch button, ACS saves the Launch ACS/TDK dialog settings to the specified Comfile without generating any code. After creating the Comfile, reopen the Launch ACS/TDK dialog and remove the -DROP_COMFILE parameter, else ACS will not generate code when using that settings file.
To generate code using the command line interface and the Comfile you created, use the following syntax:
Shadowacs -USE_COMFILE:<path and name of Comfile> -Force_Gen_Once_And_End
For example, to generate code using a Comfile named MyComfile.drp from the C:\Comfiles folder, you would use the following command:
Shadowacs -USE_COMFILE:C:\Comfiles\MyComfile.drp -Force_Gen_Once_And_End
The -Force_Gen_Once_And_End parameter starts ACS, and then closes ACS after the generation is complete.
In a batch file, use start/wait. For example:
start/wait Shadowacs -USE_COMFILE:C:\Comfiles\Comfile1.drop -Force_Gen_Once_And_End
start/wait Shadowacs -USE_COMFILE:C:\Comfiles\Comfile2.drop -Force_Gen_Once_And_End
start/wait Shadowacs -USE_COMFILE:C:\Comfiles\Comfile3.drop -Force_Gen_Once_And_End
For procedural information about generating code through a batch file, see Generating code through a batch file (ACS).