Select by Attribute

Script for Adobe Illustrator

Functionality

The Select by Attribute script is designed to streamline your workflow in Adobe Illustrator by enabling you to select objects based on specific attributes or categories, such as text frames, paths, clipping masks, meshes, and more. It simplifies the process of selecting specific elements within your document.

Install and Run the Script

  • Place the script file in your Adobe Illustrator scripts folder:

    MacOS: /Applications/Adobe Illustrator <Version>/Presets/<Language>/Scripts
    Windows: C:\Program Files\Adobe\Adobe Illustrator <Version>\Presets\<Language>\Scripts
  • Restart Adobe Illustrator to load the script into the File > Scripts menu.
  • Open your document and go to File > Scripts > Select by Attribute to launch the script.

Use the Script Dialog

When you run the script, an interactive dialog window will appear.

Configure your selection:

➊ 'Select All:' dropdown

Choose the category of items you want to select from the "Select all:" dropdown menu.

Here’s a list of object attributes/categories you can select:

  • Any Paths: 
    All vector shapes or lines created by connecting anchor points.

  • Clipping Paths:
    Vector paths, also known as Clipping Masks, are used to hide parts of objects that fall outside the path’s boundary.

  • Compound Paths: 
    Multiple paths combined into a single object, where overlapping areas create holes.

  • Embedded Rasters:
    Raster images that are included directly within an Illustrator file.

  • Gradient Meshes:
    Fills created using a Mesh Tool - a grid of points that define color transitions for a smooth gradient effect.

  • Graphs:
    Data visualizations like bar charts or pie charts created using Illustrator's Graph tool.

  • Grouped Items:
    Multiple objects combined into a single group to be moved or transformed together.

  • Guides:
    Non-printing lines used to align and position objects precisely.

  • Linked Images:
    Raster images linked from external files, not embedded in the Illustrator document.

  • Symbol Instances:
    Instances of a reusable symbol created from the Symbols panel.

  • Any Text Frames:
    All text containers in a document, regardless of type.

  • Area Type Objects:
    Text containers where text fills a defined area or shape.

  • Empty Text Frames:
    Text containers without any text content.

  • Point Type Objects:
    Text containers where text flows from a single point.

  • Type On Path:
    Text that follows the contour of a path.

  • Closed Paths:
    Paths where the end point is connected to the start point, creating a complete shape.

  • Open Paths:
    Paths that do not connect the end point to the start point, creating lines or curves.

  • Paths With Dashed Stroke:
    Paths with dashed lines applied as the stroke style.

  • Paths With Fill:
    Paths that have a color, gradient, or pattern fill applied.

  • Paths With Non-Dashed Stroke:
    Paths with a solid stroke, without dashes.

  • Paths With Stroke:
    Paths that have an outline applied, regardless of style.

  • Paths Without Fill & Stroke:
    Paths with neither a fill color nor an outline.

  • Paths Without Fill:
    Paths that only have an outline, with no fill color.

  • Paths Without Stroke:
    Paths that only have a fill color, with no outline.

  • Stray Points:
    Individual anchor points not connected to any other points or paths.

  • CMYK Color Paths:
    Paths filled or stroked with colors in the CMYK color model.

  • Grayscale Color Paths:
    Paths filled or stroked with shades of gray.

  • RGB Color Paths:
    Paths filled or stroked with colors in the RGB color model.

  • Global / Spot Color Objects:
    Objects using global or spot colors for consistent color application.

  • Gradient Objects:
    Objects filled with gradients.

  • Pattern Objects:
    Objects filled with repeating patterns.

  • Partially Transparent Items:
    Objects with some level of transparency but not fully transparent.

  • Fully Transparent Items:
    Objects that are completely transparent, with 0% opacity.


➋ 'Select In:' dropdown

This dropdown menu defines the scope within which you want to search for the selected category. 

  • Active Document: Search through the entire document.
  • Active Selection: Limits the search to the currently selected objects.
  • Active Layer: Searches only within the active layer.
  • Active Artboard: Searches objects on the currently active artboard.

➌ 'Save Settings' checkbox

Optionally, check the “Save settings” box to retain your chosen category and scope for the next time you use the script.

  • Preferences are saved in a file named select-by-attribute_settings.txt in your system’s Documents folder.


➍ Run the Script

Click the OK button: The script will select objects based on the defined criteria.

  • After processing, a dialog will inform you about the number of objects selected.
  • The selected objects will be located in the Illustrator document.
  • Clicking the Cancel button closes the dialog without making any selection.


➎ Access the User Guide

Press the icon with three horizontal lines () to open the User Guide for detailed instructions on using the script.

⚠︎ Additional Notes:

  • The script ignores locked or hidden items and layers.
  • Large documents with many items may slow down during selection.
  • It is highly recommended to save your document, especially complex or large files, before running the script. This ensures that all changes are securely backed up and minimizes the risk of data loss in case of unexpected issues. 

Overall, the "Select by Attribute" script for Adobe Illustrator provides a user-friendly way to select objects based on specific categories and scopes, streamlining the object selection process for designers.


Leave a comment

This site is protected by hCaptcha and the hCaptcha Privacy Policy and Terms of Service apply.