Moving objects to a new layer

This section is for general discussion about Gadgets

Moving objects to a new layer

Postby jimandi5000 » Wed Nov 07, 2018 2:24 pm

Hello everyone,

I don't know if it's the lack of caffeine, but I have come to realize... I have to ask the question.

How do you move selected objects from one layer to another?

I am writing a simple gadget that creates an object (simple rectangle) on a temporary layer and then applies a tool path (pocket) to that object and I want to move it to a destination layer. I can selected but I cannot seem to figure out how to get it to a destination layer.

I have copied it... But when I delete the original object the tool path as lost relationship.

I am completely befuddled.

Would appreciate any insight. Okay, I'm begging for help here. :wink:
Thanks,
Jim
User avatar
jimandi5000
 
Posts: 18
Joined: Wed Mar 11, 2015 6:50 pm
Location: North Houston Tx.
Model of CNC Machine: Home Made 60 x 120

Re: Moving objects to a new layer

Postby mtylerfl » Wed Nov 07, 2018 2:32 pm

Right click on an object you have selected...choose Move to Layer or Copy to Layer...choose an existing Layer or create a new one you want the object to be moved or copied to
Michael Tyler

carvebuddy.com

facebook.com/carvebuddy

-CarveWright CNC
-ShopBot Buddy PRSAlpha CNC
User avatar
mtylerfl
Vectric Wizard
 
Posts: 3357
Joined: Thu Jan 29, 2009 3:54 am
Location: Brunswick, GA
Model of CNC Machine: -CarveWright CNC -ShopBot Buddy PRSAlpha

Re: Moving objects to a new layer

Postby Adrian » Wed Nov 07, 2018 3:44 pm

If you're moving from layer to layer and you've already got it associated with a toolpath then the toolpath is not going to know anything about that move. There isn't a link maintained so you would need to recreate that relationship.
User avatar
Adrian
Vectric Archimage
 
Posts: 8619
Joined: Thu Nov 23, 2006 2:19 pm
Location: Surrey, UK
Model of CNC Machine: ShopBot PRS Alpha 96x48

Re: Moving objects to a new layer

Postby jimandi5000 » Sat Nov 17, 2018 2:00 am

Thanks mtylerfl,

This info is good but it's not what I am looking for. I am programming a "gadget" to to select objects on a layer and move them to a new layer. ;)

Anyone know how to do that with a gadget?
Thanks,
Jim
User avatar
jimandi5000
 
Posts: 18
Joined: Wed Mar 11, 2015 6:50 pm
Location: North Houston Tx.
Model of CNC Machine: Home Made 60 x 120

Re: Moving objects to a new layer

Postby jimandi5000 » Sat Nov 17, 2018 2:03 am

Hello Adrian,

I want to move the objects not the toolpaths.

Any thoughts?

Jim
Thanks,
Jim
User avatar
jimandi5000
 
Posts: 18
Joined: Wed Mar 11, 2015 6:50 pm
Location: North Houston Tx.
Model of CNC Machine: Home Made 60 x 120

Re: Moving objects to a new layer

Postby Adrian » Sat Nov 17, 2018 8:43 am

Ok, from what you wrote originally it sounded like you wanted to maintain the toolpath as you said the problem was the toolpath losing it's relationship.

There isn't an inbuilt move command for layers. It's basically what you're doing now by copying and deleting the vectors on the layer.
User avatar
Adrian
Vectric Archimage
 
Posts: 8619
Joined: Thu Nov 23, 2006 2:19 pm
Location: Surrey, UK
Model of CNC Machine: ShopBot PRS Alpha 96x48

Re: Moving objects to a new layer

Postby jimandi5000 » Tue Nov 20, 2018 6:20 pm

Hello Adrian,

If I create a vector and then associate a tool-path to the vectors; then copy the vector to a new layer, I will lose the tool-path association. What I'm looking for is a straight move to a existing layer and retaining the tool-path association.

I can do this a number of way:

1. function to move objects to a new layer
2. function to group objects in V Carve 9.5, do not have Aspire
3. function to select the last object created


Thoughts anyone?

Jim
Thanks,
Jim
User avatar
jimandi5000
 
Posts: 18
Joined: Wed Mar 11, 2015 6:50 pm
Location: North Houston Tx.
Model of CNC Machine: Home Made 60 x 120

Re: Moving objects to a new layer

Postby Adrian » Tue Nov 20, 2018 8:24 pm

There is no move in the LUA interface for layers that I know of. Not all the functions that are available in the actual program exist in the LUA interface.

With a copy you're creating a completely new vector so there is no toolpath association with that. Haven't got time to try it at the moment but you could see what happens if you add an existing toolpathed vector to the layer via AddObject and the recalculate the toolpath.

Where are you creating the toolpaths from? If it's in code as well you could just delete and recreate the toolpaths in code.

Not sure what you mean by 2 as there is no difference between Aspire and VCarve at that level.

You can certainly select the last object (vector) created by passing the reference into the selectionlist.
User avatar
Adrian
Vectric Archimage
 
Posts: 8619
Joined: Thu Nov 23, 2006 2:19 pm
Location: Surrey, UK
Model of CNC Machine: ShopBot PRS Alpha 96x48


Return to Gadgets - General

Who is online

Users browsing this forum: No registered users and 4 guests