Text frame onto path, automation
Copy link to clipboard
Copied
Hello group,
I will write what what I would like to get. I have what is on picture A, and I would like to get what is on picture B. Kind of script, idea or anything what could help. And I want pay.
Some more details - I have more such text frames in my document and I would like to move them onto paths. It is a map and I don't want horizonal text - topo names, I would like to move them on paths, prepared before. It could be for example kind od "drag and drop" idea. I grab them and drop onto paths. Or perhaps somebody has got any better ideas. Semi - automation is OK.
I attach illustrations. If there is ai sample file needed, I will prepare that.
Thank you for any help.
Explore related tutorials & articles
Copy link to clipboard
Copied
Hi @Beff, unless you have special requirements beyond what you've shown here, I think running a script would take about the same amount of time as copying the text, clicking on the path (to convert to path text) and pasting and deleting the first path.
That said, a script or action should easily cope with the task. Someone here will be able to write it, or I will have a go when I get some time. There may be challenges relating to the orientation of the text, but I doubt it will be too difficult. - Mark
Copy link to clipboard
Copied
Bonjour,
Au plus simple, pour peut-être pour contenter Beff ?
Sélectionnez le texte et le tracé.
// JavaScript Document
if (app.documents.length > 0) {
var docRef = activeDocument;
var selectedItems, nbItems, saisieText, pathTextRef;
selectedItems = selection;
nbItems = selectedItems.length;
if (nbItems > 1) {
for (var i = 0; i < nbItems; i++) {
if (selectedItems[i].typename == "TextFrame") {
saisieText = selectedItems[i].contents;
selectedItems.splice(i,1);
break;
}
}
if (selectedItems[0].typename == "PathItem" && saisieText != undefined) {
pathTextRef = docRef.textFrames.pathText(selectedItems[0]);
pathTextRef.contents = saisieText;
}
}
}
René
Copy link to clipboard
Copied
Bonjour,
Nice, Rene 🙂
But I see some are upside down on the paths after applying script. So first all paths should be made in one direction.
The other thing it would be OK to do them at once. All of them, but for sure there would be conflicts (when one text frame comes through two paths and so on). So these conflicts I could do manually afterwards. There shouldn't be much of such conflicts per map.
Can we talk on priv ?
Cordialement,
Copy link to clipboard
Copied
Oui tu peux, mais donne des exemples (CS6)
ainsi que les détails.
Cordialement René
Toujours la même adresse mail.
Copy link to clipboard
Copied
Bonjour Beff,
Comme le précise M1b, la position du texte par rapport au tracé n'est pas toujours facile à prévoir.
Ce qu'il faut savoir:
Par défaut, le point de départ du texte est situé sur le point p0 (début du tracé) et aligné à gauche.
Le texte est situé au dessus du tracé si le sens est positif (polarité), tu peux facilement inverser le sens du tracé en pointant l’outil plume sur le point p0 avant l’exécution du script. Ou après en faisant basculer le crochet central de l’autre coté du tracé, le sens du tracé se trouve ainsi inversé (basculement symétrique).
René

