0
convert a selected shape in text path...
New Here
,
/t5/illustrator-discussions/convert-a-selected-shape-in-text-path/td-p/1162324
Dec 13, 2008
Dec 13, 2008
Copy link to clipboard
Copied
Hi,
here is my code JS :
var docRef = activeDocument;
var lineRef = docRef.selection;
if ( activeDocument.selection.length > 0 ) {
var v = prompt("Saisissez votre texte...", "texte sur tracé");
var lineRef = activeDocument.pathItems[0];
var pathTextRef = activeDocument.textFrames.pathText(lineRef);
docRef.textFrames[0].contents = v;
docRef.textFrames[0].textRange.characterAttributes.size = 30;
docRef.textFrames[0].paragraphs[0].paragraphAttributes.justification = Justification.CENTER;
}
else {
alert( "Il faut sélectionner un tracé avant de lancer le script !" );
}
That's run But it's not the selected shape on my document who is converted in textpath
Thanks
JP
here is my code JS :
var docRef = activeDocument;
var lineRef = docRef.selection;
if ( activeDocument.selection.length > 0 ) {
var v = prompt("Saisissez votre texte...", "texte sur tracé");
var lineRef = activeDocument.pathItems[0];
var pathTextRef = activeDocument.textFrames.pathText(lineRef);
docRef.textFrames[0].contents = v;
docRef.textFrames[0].textRange.characterAttributes.size = 30;
docRef.textFrames[0].paragraphs[0].paragraphAttributes.justification = Justification.CENTER;
}
else {
alert( "Il faut sélectionner un tracé avant de lancer le script !" );
}
That's run But it's not the selected shape on my document who is converted in textpath
Thanks
JP
TOPICS
Scripting
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Explore related tutorials & articles
LEGEND
,
/t5/illustrator-discussions/convert-a-selected-shape-in-text-path/m-p/1162325#M238195
Dec 13, 2008
Dec 13, 2008
Copy link to clipboard
Copied
Jean, in your other thread on the same subject, you said you wanted to:
> Open a new document, select a circle on the page and run convert it.
There is no circle on the page of a new document. That's why Larry told you to create a new document, draw a circle and then use the script statements he provided you.
In the code that Larry provided, (and that you have used in the script in this thread), this line:
> var lineRef = activeDocument.pathItems[0];
is referencing the topmost (index 0) pathItem in the document.
to reference the topmost (index 0) pathItem of the current selection, change that line to:
> var lineRef = activeDocument.selection[0];
JET
> Open a new document, select a circle on the page and run convert it.
There is no circle on the page of a new document. That's why Larry told you to create a new document, draw a circle and then use the script statements he provided you.
In the code that Larry provided, (and that you have used in the script in this thread), this line:
> var lineRef = activeDocument.pathItems[0];
is referencing the topmost (index 0) pathItem in the document.
to reference the topmost (index 0) pathItem of the current selection, change that line to:
> var lineRef = activeDocument.selection[0];
JET
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
_jeanphide_
AUTHOR
New Here
,
LATEST
/t5/illustrator-discussions/convert-a-selected-shape-in-text-path/m-p/1162326#M238196
Dec 13, 2008
Dec 13, 2008
Copy link to clipboard
Copied
Thanks a lot James
it's OK now :)
it's OK now :)
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

