Set param- Printable Version +- RoboDK Forum (//www.sinclairbody.com/forum) +-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN) +--- Forum: RoboDK API (//www.sinclairbody.com/forum/Forum-RoboDK-API) +--- Thread: Set param (/Thread-Set-param) |
Set param-amartinmestres-05-23-2022 When I try to do in a program Var x =Prog.setParam(ins_id); Prog2.SetParam("Last",x); Only to duplicate the entire program, works well except on Set tool instructions, aparentally is ok, but when execute the instruction, this tool change to O. It's is the same on c# Api and python Api. The same appears in the example that you provide to generate weaving (you do a copy of all instruction) Perhaps is s bug? On other hand , Do you have some documentation to know all the tricks and possibles Params of the instruction SetParam? Like if you use it on Item type program you can do it, in a Item type machining program yo can do... RE: Set param-amartinmestres-05-24-2022 If i do this trick, it work well, but i don't undersetand becouse dont work without the modifcation of Frame and Tool. var s = prog.SetParam(counter.ToString()); dynamic jsonObj = Newtonsoft.Json.JsonConvert.DeserializeObject(s); jsonObj(“名字”)= "功能" + counter.ToString (); if (jsonObj["Type"] == "4") { prog.SetTool(DGH_DK._rdk.GetItemByName("Tool 0 Antorcha Fronius")); } else if (jsonObj["Type"] == "3") { prog.SetFrame(DGH_DK._rdk.GetItemByName("UFRAME 1")); } else { string output = Newtonsoft.Json.JsonConvert.SerializeObject(jsonObj, Newtonsoft.Json.Formatting.Indented); prog.SetParam("Last", output); } RE: Set param-Sam-05-24-2022 Hi, If the "Force original pose" is set on the source Program (ForcePose==1 in the JSON), which is typically the case on Machining projects, copying the instruction will result in the tool being reset. You can set the ForcePose to 0 on the copied instruction to fix this issue. We'll add the original pose in the JSON in a future update. To list all available commands for RDK.Command() and Item.SetParam: RoboDK->Tools->Run Script->Show Commands RE: Set param-amartinmestres-05-25-2022 Force pose don't work, but I can do the trick |