MoI discussion forum
MoI discussion forum

Full Version: Script to select all edges and merge

Show messages: All  1-2  3-6

From: Peticel
26 Sep 2022   [#3] In reply to [#2]
Hi Michael, thank you for the reply. This is how I've been doing it until now but I was hoping to bind this to a key.

I've tried this - Ctrl+M - script:moi.geometryDatabase.selectAll(); Merge;
but I get an error message saying - ReferenceError: Can't find variable: Merge

Any suggestions? Thank you in advance!
From: Frenchy Pilou (PILOU)
26 Sep 2022   [#4] In reply to [#3]
Careful Merge is also a Boolean trimming function! ;)
From: Michael Gibson
26 Sep 2022   [#5] In reply to [#3]
Hi Peticel, the problem is that the contents for a shortcut key can either be a command name or it can be script code to run.

But in your case there you've got both of those together.

You'll need to put in this instead:

script:moi.geometryDatabase.selectAll(); moi.command.execCommand( 'Merge' );

- Michael
From: Peticel
26 Sep 2022   [#6] In reply to [#5]
Thank you, Michael. Works perfectly!

Kind regards,
Peticel

Show messages: All  1-2  3-6