SaveAs

Saves the project under a new name. Requires a full path.

Note:

This script takes two parameters for non-schematic/layout designs and four parameters for schematic/layout designs.

UI Access File > Save As.
Parameters
Name Type Description
<NewName> String The desired name of the project, with directory and extension.
<OverWriteOK> Boolean True to overwrite the file of the same name, if it exists. False to prevent overwrite.

<DefaultAction>

String

For Schematic/Layout projects only. Otherwise omit. See note below.

Valid actions: ef_overwrite , ef_copy_no_overwrite, ef_make_path_absolute, or empty string.

<OverwriteActions>

Array

For Schematic/Layout projects only. Otherwise omit. See note below.

Structured array: Array("Name: <Action>", <FileName>, <FileName>, ...)

Valid actions: ef_overwrite , ef_copy_no_overwrite, ef_make_path_absolute, or empty string.

Return Value None.

 

Python Syntax For non-Schematic/Layout project: SaveAs ( <NewName> <OverWriteOK>)

For Schematic/Layout project: SaveAs (<NewName> <OverWriteOK> <DefaultAction> <OverrideActions>)

Python Example

oProject.SaveAs('D:/projects/project1.aedt', True)

----

oProject.SaveAs('D:/Projects/Project1.aedt', True, 'ef_overwrite', ['NAME:OverrideActions', ['NAME:ef_copy_no_overwrite', ['NAME:Files',

'$PROJECTDIR/circuit_models.inc']], ['NAME:ef_make_path_absolute', ['NAME:Files', '$PROJECTDIR/SL_6s.sp']]])

 

Important:

The DefaultAction and OverrideActions strings correspond to the following actions:

  • ef_overwrite – Copy file to new project directory and overwrite.
  • ef_copy_no_overwrite – Copy file to new project directory and don't overwrite.
  • ef_make_path_absolute – Change reference to point to file in old project directory.
  • Empty String – Do nothing.

The DefaultAction is applied to all files that are NOT explicitly listed in the OverrideActions array. Those in the OverrideActions array are separate arrays for actions that are different from the default action; those actions are applied to the files listed in the same array:

  • If OverrideActions are not specified, DefaultAction is applied to ALL files in project directory.