Skip to main content
Volition74au
Inspiring
August 29, 2025
Answered

How to expose Stroke Dashes "Offset" property via scripting? After Effects Scripting Bug

  • August 29, 2025
  • 2 replies
  • 586 views

Hi all,

I'm trying to write a script that creates consistent dash lengths in shape layers, but i cannot seem to operate on the 'Stroke/Dashes/offset' property

From digging (using scripting + property inspection) I found that the Dashes group always contains:

Dash 1

Gap 1

Dash 2

Gap 2

Dash 3

Gap 3

Offset

When working in the UI, if I add a Dash or Gap, After Effects automatically makes the Offset property visible, and each dash and gap as you add them setting a value. 


However, when I do the same via scripting, Dash 1 and Gap 1 become visible as expected, but the Offset never shows up in the UI. Scripting can still find the property (ADBE Vector Stroke Offset), but it remains hidden in the panel.


Example

var comp = app.project.activeItem;
var lyr = comp.selectedLayers[0];
var contents = lyr.property("ADBE Root Vectors Group");
var grp = contents.addProperty("ADBE Vector Group");
grp.name = "Group 1";

var sub = grp.property("ADBE Vectors Group");
var stroke = sub.addProperty("ADBE Vector Graphic - Stroke");
var dashes = stroke.addProperty("ADBE Vector Stroke Dashes");

var dash = dashes.addProperty("ADBE Vector Stroke Dash 1");
var gap = dashes.addProperty("ADBE Vector Stroke Gap 1");
var offset = dashes.addProperty("ADBE Vector Stroke Offset");

Has anyone figured out a way to make the Offset visible in the UI via scripting (the same way AE does automatically when you add a dash manually

I'm 99% confident this is a bug in scripting.
The user guide has the property listed as a match name along with the dash and gaps which work properly but fail to mention that it cannot be exposed. Hopefully i can draw attention to this bug to the right team,

Correct answer Roland Kahlenberg

Try adding .setValue(5) to the addProperty line. 


2 replies

Roland Kahlenberg
Legend
September 1, 2025

Looks like you missed the addProperty - 

var offset = dashes.property("ADBE Vector Stroke Offset");


var offset = dashes.addProperty("ADBE Vector Stroke Offset"); 


Very Advanced After Effects Training | Adaptive & Responsive Toolkits | Intelligent Design Assets (IDAs) | MoGraph Design System DEV
Volition74au
Inspiring
September 5, 2025

sorry my fault my example script had a type yes i've edited it to be correct. 

var offset = dashes.addProperty("ADBE Vector Stroke Offset");

i did have it as `dashes.property` instead of `dashes.addProperty`

this still does not work. DId you try it? Can you get the 'Dash' , 'Offset' Property to expose. I cannot.

Roland Kahlenberg
Roland KahlenbergCorrect answer
Legend
September 5, 2025

Try adding .setValue(5) to the addProperty line. 


Very Advanced After Effects Training | Adaptive & Responsive Toolkits | Intelligent Design Assets (IDAs) | MoGraph Design System DEV
Volition74au
Inspiring
August 31, 2025

I'm thinking I should have set this up as a bug. The scripting guide lists the "Dashes" "Offset" matchname the same way as "Dashes and "Gaps" yet it cannot be exposed as they can.  

Can a mod move this to bugs please, if you agree.