Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

模拟事件API

#1
Hello everyone, I'm working on a c++ plugin for RoboDK and I'm wondering if I can call simulation events using APIs somehow. In particular, I need to add an "attach to tool" and a "set absolute position" event instruction to a program.
As far as the attach to tool event is concerned, is there a way to choose the object from a list rather than picking the closest one?
I guess some kind of JSON/String is required, in case would you please show me the format needed?

Thanks a lot in advance, have a good one!
#2
To trigger these type of events it is better to use custom Python scripts.

For example, you can add a custom Program call instruction to a Python script using setParam and a JSON string as shown in this example:
//www.sinclairbody.com/doc/en/PythonAPI/exam...structions
This works in C++ the same way.

Then, in your Python script you can use setParentStatic to change the relationship of a specific object.




Users browsing this thread:
1 Guest(s)