Cut and Paste under Plugin for Mac and PC

Hi guys

I’m trying to run the following situation through an extension I’m developing:

Sketchup.send_action ("cut")
Sketchup.send_action ("paste")

By typing this in ruby console, it works perfectly in both the PC and Mac. It copies and pastes the selected component. However, implementing this directly in the extension (ex. in a extensionx.rb), only works on the PC, even returning “true” for both sentences.

Any idea how to make it work on Mac?

that doesn’t work from Ruby Console or a file on my mac…

  Sketchup.send_action('cut:')
  Sketchup.send_action('paste:')

works from both, as it has the correct syntax…

john

1 Like

For the avoidance of doubt…

Never include a space between the method and its parenthesized argument[s].

Always end your ‘send_action’ string with a colon [:]

When you do a send_action paste the user still needs to choose the location…

1 Like

If you could describe more closely what you actually wish to do, there are better alternatives.