Skip to main content

Using the Ai Custom Script

Updated this week

The script is included in the VStitcher installation files. To use the script, you must locate it and copy the path to Preferences. If you prefer, you can request a copy of the script file from customer support.

To Use the Ai Custom Script

  1. In VStitcher, open the Preferences dialog box.

  2. Under Images &Colors, next to Ai Custom Script, you can enter the path to the multi_layer_sample_with_materials.jsx script file or browse to the file.

    prefrences_dialog.png

    To locate the script file on your computer, follow the instructions below for a Windows or Mac machine:

    For Windows

    Copy the path that follows and paste it into the Ai Custom Script box. Make sure that the version number (in bold) in the path matches the VStitcher version you are using:

    C:\ProgramFiles\Browzwear\VStitcher\2023.1\Resources\Illustrator\multi_layer_sample_with_materials.jsx

    Or follow these steps:

    1. Click Browse and navigate to the following folder: C:\Program Files\Browzwear\VStitcher\2023.1\Resources\Illustrator (Make sure that the version number (in bold) in the path matches the VStitcher version you are using.)

    2. Select the multi_layer_sample_with_materials.jsx file.

    For Mac

    Copy the path that follows and paste it into the Ai Custom Script box. Make sure that the version number (in bold) in the path matches the VStitcher version you are using:

    /Applications/Browzwear/VStitcher 2022.2.app/Contents/RootDir/Resources/Illustrator/multi_layer_sample_with_materials.jsx

    Or follow these steps:

    1. Open the Finder.

    2. Select Main Menu> View> Show Path Bar to make sure you can view the path to the current working directory at the bottom of the Finder window.

    3. Then, select Applications> Browzwear.

    4. In the Browzwear folder, right click on VStitcher version you are using and select Show Package Contents.

    5. In the window that appears, select Contents> RootDir> Resources> Illustrator.

    6. In the Illustrator folder, select the multi_layer_sample_with_materials.jsx file. Take note that the file is also highlighted in the path at the bottom of the window.

    7. Right click multi_layer_sample_with_materials.jsx in the path and select Copy ” multi_layer_sample_with_materials.jsx” as Pathname to copy the path to the .jsx file.

      copy-file-pathname.png
    8. Paste the path into the Ai Custom Script box.

  3. When using the Multi-Layer Ai Custom Script, we recommend that you also select the Use one master Ai file for all colorways checkbox. This feature maintains the vector behavior when the Ai artwork is cloned for a new colorway. If this option is not checked, the Ai artwork will lose vector behavior when cloned for a new colorway.

    When the Use one master Ai file for all colorways option is enabled, any changes made in the Ai file while editing in external software, will apply to all cloned materials of the artwork in the same colorway and all cloned colorways. For example, if a fill color is changed in Ai, that fill color will change in all cloned materials in the file. The following message will appear to remind you of this behavior.

    edit-externally-message.png
  4. Click OK to save the changes in the Preferences dialog box. Next time you add an Ai file with layers as a material, a message appears prompting you to select the imported Adobe Illustrator object type.

    adobe-object-type.png
  5. Select Each layer as a Separate Artwork. This option opens the file in Adobe Illustrator and converts and imports each layer of the file as a separate SVG file. This allows you to edit each layer separately when added as artwork and maintains the vector behavior.

  6. Click OK to continue working on the artwork.

Illustrator Script for Multi-Layer Export (VStitcher 2025.3)

Starting with VStitcher 2025.3, updates were made to the Adobe Illustrator script used for multi-layer export.

Issue

When using a custom Illustrator script created for earlier versions of VStitcher, the export process may fail if a higher rasterization DPI is configured.

This issue occurs when the following setting is defined in the VStitcher INI file:

<Atr N="IllustratorRasterizationDPI" V="300" />

In this case, the raster process may stop and display an error message during export.

Image preview

Resolution

Option 1: Use the Updated Sample Scripts (Recommended)

VStitcher 2025.3 includes updated Illustrator sample scripts that support multi-layer export with higher rasterization DPI values.

The updated scripts are located at:

<VStitcher-install-dir>/Resources/Illustrator/

Available files:

  • multi_layer_sample.jsx

  • multi_layer_sample_with_materials.jsx

Use one of these scripts to ensure compatibility with VStitcher 2025.3.


Option 2: Update an Existing Custom Script

Custom scripts can be updated manually by referencing the updated sample scripts included with VStitcher 2025.3.

When comparing scripts:

  • Red lines indicate the implementation used in VStitcher 2025.2

  • Green lines indicate the required changes for VStitcher 2025.3

Image preview

Notes

  • This update applies only to multi-layer export workflows using Adobe Illustrator scripts.

  • No changes are required if the updated 2025.3 sample scripts are already in use.

  • Users who do not modify the IllustratorRasterizationDPI setting are not affected.

Did this answer your question?