Copy link to clipboard
Copied
Does jsx have alternative for this app.executeMenuCommand("join")?
Are there method with which is possible to apply join on two or more objects?
Or are there any other alternative for this?
To join objects, the script needs to know which objects the user wants to join. You can try to collect all points of vector paths into an array and create a new pathItem with myPath.setEntirePath(points), while deleting the original paths.
Copy link to clipboard
Copied
Bonjour,
Sélectionnez les tracés à joindre...
// JavaScript Document
// Objet > Tracé > joindre
// -------
(function () {
if (selection.length) {
app.executeMenuCommand('join');
}
})();
Copy link to clipboard
Copied
Question was Alternative for app.executeMenuCommand("join").
To do join without need to select objects with some other method or approach.
Copy link to clipboard
Copied
To join objects, the script needs to know which objects the user wants to join. You can try to collect all points of vector paths into an array and create a new pathItem with myPath.setEntirePath(points), while deleting the original paths.
Copy link to clipboard
Copied
Yes at the end I needed to do like that.
Only as it were more complex objects instead of myPath.setEntirePath(points) it needed
var pathPoints = path.pathPoints;
pathPoints.add();
.anchor
.rightDirection
.leftDirection
.pointType ...
to recreate same object.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now