I know I can create paths by doing the following:
createinstance(node("/AGV/StraightPath",library()),model());
However, once created, sized, and positioned the paths are not connected. I tried to use the code from the join path edit mode, but was unable to reliably create good connection paths. Is there a good way to do this? The following is the code I am using to test the concept:
treenode path1 = createinstance(node("/AGV/StraightPath",library()),model()); treenode path2 = createinstance(node("/AGV/StraightPath",library()),model()); setsize(path1,3,1,1); setsize(path2,8,1,1); setloc(path1,1,0,0); setloc(path2,5,1,0); setrot(path2,0,0,90); treenode from = path1; treenode to = path2; if (isclasstype(from, "AGV::Path") && isclasstype(to, "AGV::Path")) { double distAlongFrom = 2.85; double distAlongTo = 0.16; treenode newPath = applicationcommand("Path_joinTo", from, to, distAlongFrom, distAlongTo); }