Pasting LUA into VCarve Pro

This section is for general discussion about Gadgets
Post Reply
GrandpaB
Vectric Apprentice
Posts: 53
Joined: Fri May 18, 2012 4:19 pm
Model of CNC Machine: Shark

Pasting LUA into VCarve Pro

Post by GrandpaB »

I viewed the LUA videos and tried to paste a LUA script into VCarve Pro, but Paste is not active. The first line of the script is: --VECTRIC LUA SCRIPT. I can paste VCarve Pro objects, and bitmaps into VCarve, but when I have copied some text, even from Notepad++, copy is not active. What have I missed?

User avatar
Adrian
Vectric Archimage
Posts: 14541
Joined: Thu Nov 23, 2006 2:19 pm
Model of CNC Machine: ShopBot PRS Alpha 96x48
Location: Surrey, UK

Re: Pasting LUA into VCarve Pro

Post by Adrian »

You don't paste LUA code into VCarve.

Gadgets are separate files (ending in .lua) that are placed into the Gadgets folder and then are automatically loaded onto the Gadgets menu when VCarve is next loaded.

The correct place to put them is Public Documents\Vectric Files\Gadgets\(your vcarve version)

GrandpaB
Vectric Apprentice
Posts: 53
Joined: Fri May 18, 2012 4:19 pm
Model of CNC Machine: Shark

Re: Pasting LUA into VCarve Pro

Post by GrandpaB »

I saw the paste option when I watched the gadget videos on the Vectric website. Creating the LUA files and storing them in the Gadgets folder is a super solution for gadgets that have general usage. The pasting option, if it works, is a great option for a quick, single use gadgets and to learn and experiment with LUA.

Why can't I get the paste option to work? Has something changed and this option no longer available?

User avatar
Adrian
Vectric Archimage
Posts: 14541
Joined: Thu Nov 23, 2006 2:19 pm
Model of CNC Machine: ShopBot PRS Alpha 96x48
Location: Surrey, UK

Re: Pasting LUA into VCarve Pro

Post by Adrian »

Totally forgot you could do that to be honest as I've never really seen the point. It's faster to have a test script on the Gadgets menu and just edit that when you want to experiment/do a one off as the scripts are loaded dynamically.

Having said that the paste is working fine for me with VCarve 8.5

Have you got a space after the -- on the first line? That's important.

GrandpaB
Vectric Apprentice
Posts: 53
Joined: Fri May 18, 2012 4:19 pm
Model of CNC Machine: Shark

Re: Pasting LUA into VCarve Pro

Post by GrandpaB »

Adrian,

Thanks that was the problem! I had just reviewed the gadget video again and noticed the missing space. When I added the space the paste option was activated. I just came back to the forum to post the importance of the space when I saw your post. Thanks again for your support.

PatL
Posts: 14
Joined: Sat Sep 14, 2019 4:36 pm
Model of CNC Machine: ShopSabre

Re: Pasting LUA into VCarve Pro

Post by PatL »

I had the same problem. It also needs to be in all caps

Post Reply