Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Alternative for app.executeMenuCommand("join")?

Participant ,
Mar 27, 2025 Mar 27, 2025

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?

TOPICS
Scripting , SDK
507
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Mar 29, 2025 Mar 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.

Translate
Adobe
Advocate ,
Mar 28, 2025 Mar 28, 2025

Bonjour,

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

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

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 28, 2025 Mar 28, 2025

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

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Mar 29, 2025 Mar 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 17, 2025 Apr 17, 2025
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines