Skip to main content
Participating Frequently
September 25, 2017
Question

SolidColor and Units is undefined

  • September 25, 2017
  • 2 replies
  • 1048 views

Hi,

I'm new to ps scripting and struggling with an issue for following code:

SolidColor.prototype._toString = function() {

var c = this;

var m = c.model.toString().match(/\.(\w+)$/);

var model = m[1];

return "{ " + model + ": [" + c._toBytes() + "]}";

};

While running this in AI it throws error:

SolidColor is undefined

Any idea why?

This topic has been closed for replies.

2 replies

c.pfaffenbichler
Community Expert
Community Expert
September 26, 2017

So to clarify: Which application are you trying to Script for exactly?

Participating Frequently
September 26, 2017

I'm creating the extension for PHXS,PHSP and ILST.

Disposition_Dev
Legend
September 25, 2017

Simply because there is no reference (that i know of) to "SolidColor" in illustrator. it doesn't exist in the scripting reference or the OMV...

Can you tell us a little more about what you're trying to do so we can help point you in the right direction?

Silly-V
Legend
September 26, 2017

It looks like a ps scripting question in the AI forum: I'm going to try and move it.

Disposition_Dev
Legend
September 26, 2017

i wondered that myself, but they did say at the end "AI" throws error.