Gadget SDK and Programatically Selecting Gadgets

This section is for general discussion about Gadgets

Gadget SDK and Programatically Selecting Gadgets

Postby iank » Sat Mar 05, 2016 3:06 pm

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
iank
 
Posts: 8
Joined: Fri Jan 03, 2014 2:44 pm
Location: Sheffield, UK
Model of CNC Machine: CNCDudez Mini Muscle

Re: Gadget SDK and Programatically Selecting Gadgets

Postby iank » Mon Mar 21, 2016 2:10 pm

Seems my Gadget SDK pdf was either out of date or corrupt. Reinstalled the SDK and its all there in the documentation Doh!
iank
 
Posts: 8
Joined: Fri Jan 03, 2014 2:44 pm
Location: Sheffield, UK
Model of CNC Machine: CNCDudez Mini Muscle

Re: Gadget SDK and Programatically Selecting Vectors

Postby CNCDaveToo » Thu Jan 25, 2018 4:36 am

The only reference I've found in the API documentation for selecting vectors is:

(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


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.)
CNCDaveToo
Vectric Apprentice
 
Posts: 5
Joined: Mon Jan 22, 2018 3:47 am
Location: Leesburg, Virginia, USA
Model of CNC Machine: ShopBot Desktop

Re: Gadget SDK and Programatically Selecting Gadgets

Postby CNCDaveToo » Thu Jan 25, 2018 1:16 pm

Ugh. Found answer to above (RTFM) -- sorry for the noise.
CNCDaveToo
Vectric Apprentice
 
Posts: 5
Joined: Mon Jan 22, 2018 3:47 am
Location: Leesburg, Virginia, USA
Model of CNC Machine: ShopBot Desktop


Return to Gadgets - General

Who is online

Users browsing this forum: No registered users and 2 guests