Skip to main content
Participant
August 30, 2008
Question

Make symbol...

  • August 30, 2008
  • 8 replies
  • 805 views
I'm interested in making a symbol from a layer ala applescript or javascript. The interesting part is that the docs say that the source art can be anything but the command appears can only work with a page item, not a layer. Additionally, the command seems to fail miserably if there are a > 1 page items.

Does anyone know if it is possible to script creation of a symbol from more than one item? If so, can you shed insight onto the syntax that will allow someone to do so?

Thanks in advance,
- Alex
This topic has been closed for replies.

8 replies

Participant
September 2, 2008
Awesome, this works. Thanks a lot. But I still can't find out how to specify the syntax to include more than one item in the symbol definition. I'd like to identify the layer, identify all the path elements within that layer and create a new symbol using them. If I have to group all items in the layer, then ungroup, it's going to be a pain.
Larry G. Schneider
Community Expert
Community Expert
September 2, 2008
Group all the items.

From the JS Reference, p. 184

Returns a symbol object created from the
source art item, any of the following:
CompoundPathItems
GraphItems

GroupItems <---

MeshItems
PathItems
PlacedItems
PathItems
RasterItems
SymbolItems
TextFrames
Participant
September 2, 2008
Well, that's it. Everything is in one layer. Even though the documentation states that "any type" is valid for the argument to art source, I can not use layer as a data type. Only page item appears to work. And I can not specify more than one page item. If you know how to make a layer work as an argument to art source, please tell me.

Thanks,
- Alex
Larry G. Schneider
Community Expert
Community Expert
September 2, 2008
Have you tried moving everything onto one layer first?
Participant
September 1, 2008
I've looked at the Applescript and the Javascript make symbol reference. The reason I am asking is that I have no problem creating a symbol with 1 layer. All attempts to figure out the syntax for creating a symbol from more than one layer or page item fails miserably, AND is not in the docs which is why I am asking.

As I said in my original post:
"I'm interested in making a symbol from a layer ala applescript or javascript. The interesting part is that the docs say that the source art can be anything but the command appears can only work with a page item, not a layer. Additionally, the command seems to fail miserably if there are a > 1 page items. "

So does anyone know the proper syntax for making a symbol with more than 1 page item? And if so, could you share it with me?

Thanks,
September 1, 2008
Did you take a look at page 184 of the Jvascript reference?

Not sure if its exactly what you are looking for but it could get you started.

Regards
Norbert
Participant
September 1, 2008
CS3.

Yes, but the question is how?

I'm looking for the syntax to do it. The docs were not that handy.

Thanks,
September 1, 2008
Hi Alex,

What version are you using? CS3 does create symbols with more than 1 item. Not sure about CS2