utParameterList - VCarvePro

This section is for general discussion about Gadgets

utParameterList - VCarvePro

Postby Raedle » Sat Mar 17, 2018 4:57 pm

I'm trying to use the object utParameterList for a Job with out any success. I can set parameters but not get them. How do I add the parameter list object to the job? Please help. Thank you.

Code: Select all
function JobParameters(myJob)
  local dblValue
  local myParameterList

  --return utParameterList object
  myParameterList=myJob.JobParameters
  --Set a parameter
  myParameterList:SetDouble("TESTME",9.99)

  --try to get parameter -> this does not work! What is wrong with the call
  dblValue=myParameterList:GetDouble("TESTME",1.11,true)
 
  return
end
Raedle
 
Posts: 3
Joined: Sun Mar 11, 2018 5:33 pm
Model of CNC Machine: Mach3 home-built high precision CNC

Re: utParameterList - VCarvePro

Postby Raedle » Mon Mar 19, 2018 11:57 pm

Below is code where :GetDouble() method works. No idea why a ; is needed at the end of :GetDouble() and third parameter (bool create_if_not_exist) must be omitted.

Code: Select all
function JobParameters(myJob)
  local dblValue
  local myParameterList

  --return utParameterList object
  myParameterList=myJob.JobParameters
  --Set parameter
  myParameterList:SetDouble("TESTME",9.99)

  --Get parameter
  dblValue=myParameterList:GetDouble("TESTME",0.0);   --<----
  MessageBox("Value" ..dblValue)
  return
end
Raedle
 
Posts: 3
Joined: Sun Mar 11, 2018 5:33 pm
Model of CNC Machine: Mach3 home-built high precision CNC


Return to Gadgets - General

Who is online

Users browsing this forum: No registered users and 3 guests