I want to do like this
does anyone have an idea
or any other way
It is currently not supported to add waypoint nodes which are already assigned with a position.
Currently the API rather support generating a “template” for how the user e.g. should build their program tree around your node.
If you already have a desired position, you could just add the waypoint target directly in the contributed script.
If you would like to have functionality, that cannot be solved by the above solutions, please consider creating a feature request elaborating on the use cases you have. Post this in the Feature Request category.