Skip to main content
Inspiring
March 27, 2025
Answered

Alternative for app.executeMenuCommand("join")?

  • March 27, 2025
  • 1 reply
  • 597 views

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?

Correct answer Sergey Osokin

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.

1 reply

renél80416020
Inspiring
March 28, 2025

Bonjour,

Sélectionnez les tracés à joindre...

// JavaScript Document
// Objet > Tracé > joindre
// -------
(function () {
if (selection.length) {
      app.executeMenuCommand('join');
}
})();

 

Inspiring
March 28, 2025

Question was Alternative for app.executeMenuCommand("join").

To do join without need to select objects with some other method or approach.

Sergey Osokin
Sergey OsokinCorrect answer
Inspiring
March 29, 2025

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.