I'm using Vcarve 8 and have created a few gadgets already to do repetitive tasks in my models.
I'm currently looking at a gadget where I want to programatically create a series of contours and then create a standard toolpath for each one i.e. a pocket or a profile toolpath . Creating the contours is straight forward.
Is there a way to programaticaly select the newly created contour so that it is in the job selection list and can be used by the standard create_XXXXToolPath methods?
I can find anything documented that allows this. However, I have noticed what appears to be at least one undocumented method which may do this called SelectVectorsOnLayer, its used in an example but is not documented, Makes me wonder if there are other useful methods like this that are hidden.
I'm really trying to avoid creating external toolpaths since these then become difficult to manage if things change.
Regards
Ian
Gadget SDK and Programatically Selecting Gadgets
-
- Posts: 8
- Joined: Fri Jan 03, 2014 2:44 pm
- Model of CNC Machine: CNCDudez Mini Muscle
- Location: Sheffield, UK
Re: Gadget SDK and Programatically Selecting Gadgets
Seems my Gadget SDK pdf was either out of date or corrupt. Reinstalled the SDK and its all there in the documentation Doh!
-
- Posts: 26
- Joined: Mon Jan 22, 2018 3:47 am
- Model of CNC Machine: ShopBot D2418
- Location: Leesburg, Virginia, USA
Re: Gadget SDK and Programatically Selecting Vectors
The only reference I've found in the API documentation for selecting vectors is:
(from Profile_Vectors_On_Layer.lua)
Any ideas on what the "true, false, true" parameters are specifying in the above call to SelectVectorsOnLayer?
(I'm looking to first select the only closed vector in the layer, do some voodoo, then select the only open vector and do more voodoo.)
(from Profile_Vectors_On_Layer.lua)
Code: Select all
-- select all closed vectors on the layer
if not SelectVectorsOnLayer(layer, selection, true, false, true) then
DisplayMessageBox("No closed vectors found on layer " .. layer_name)
return false
end
(I'm looking to first select the only closed vector in the layer, do some voodoo, then select the only open vector and do more voodoo.)
-
- Posts: 26
- Joined: Mon Jan 22, 2018 3:47 am
- Model of CNC Machine: ShopBot D2418
- Location: Leesburg, Virginia, USA
Re: Gadget SDK and Programatically Selecting Gadgets
Ugh. Found answer to above (RTFM) -- sorry for the noise.