MoI discussion forum
MoI discussion forum

Full Version: Copy-paste from Rhino 7 to MoI3d

Show messages:  1-4  5-24  25-44  45-51

From: mdesign
15 Mar 2021   [#45] In reply to [#44]
Sorry for late reply.

https://www.youtube.com/watch?v=h4njmGKkPKI

Windows x64

1) create cube
2) ctrl-c cube (copy cube)
3) del cube
4) ctrl-v cube (paste cube). Nothing happen. There is no cube in the scene.
5) Click save as - cube will paste properly.

This is very annoying on bigger projects.

Cheers!!!
From: Michael Gibson
15 Mar 2021   [#46] In reply to [#45]
Hi mdesign, so this is happening when you modify the Paste command in MoI to run the helper program for enabling copy/paste to Rhino v7?

Or have you not done any modification to the paste keyboard shortcut ?

If you have modified it can you show what you have in the keyboard shortcut now for Ctrl+V ?

- Michael
From: mdesign
15 Mar 2021   [#47] In reply to [#46]
I`ve done modification on ctrl-V shortcut as you adviced before to have copy-paste feature between MoI and Rhino 7.

And it works well. But after doing that it broke my pasting inside MoI (with using ctrl-v). Maybe I should give other shortcut for Rhino paste not ctrl-v because I broke paste functionality inside MoI (when I use only MoI and I don`t use MoI-Rhino coop).

Image Attachments:
Zrzut ekranu 2021-03-16 093821.jpg 


From: Michael Gibson
15 Mar 2021   [#48] In reply to [#47]
Hi mdesign, it looks like the shortcut key is not quite right, there's a description for how it needs to be set up earlier in this thread here:
http://moi3d.com/forum/index.php?webtag=MOI&msg=9890.22

The key thing that you're missing:
quote:

One thing to note is the path name in the script code needs doubled backslash characters. Instead of just one \ as the path separator it needs 2 like \\. That's because in JavaScript a single \ is an escape character for special characters like \t means tab or \n means newline. The \\ means make a single backslash in the actual string.

So where you have "c:\UpdateRhinoClipboard.exe", you instead need it to be "c:\\UpdateRhinoClipboard.exe" - note the doubled backslash.

There is probably a bug where if you give an invalid path to moi.filesystem.shellExecute() with the "wait for finished" enabled it ends up getting stuck waiting for a non-existent program to finish running and then running some other command cancels out from that wait. I'll see if I can fix that up.

- Michael
From: Michael Gibson
15 Mar 2021   [#49] In reply to [#48]
Hi mdesign, also it looks like you may have 2 sets of quotes around the c:\UpdateRhinoClipboard.exe, one pair of single quote ' characters and another pair of double quote " characters. Modify that to have just one or the other in that spot.

- Michael
From: mdesign
16 Mar 2021   [#50] In reply to [#49]
It works!!! Thank you Michael for your effort with solving my issue. I`ve changed single backslash to double and removed unneeded pair of quotes. It helped to solve that issue exactly as you said.

Cheers!!!
From: Michael Gibson
16 Mar 2021   [#51] In reply to [#50]
You're welcome mdesign, I'm glad that it's working now!

I have tuned up the shellExecute method for v5 so that if there was an error in launching the program it won't try to wait for it to finish.

- Michael

Show messages:  1-4  5-24  25-44  45-51