Change Weld Path point names

Hello,

Is it possible to change the name of each point inside a weld statement in OLP? I tried using “Set Point Names”, but it only worked for point outside the path.

Good morning!
In fact, if you’re talking about “Via”, “Approach”… these are the IDs of the points, and after you get the handle to the welding statement, you can use the Positions to find the list containing these points. List, similarly:

from vcScript import *

def OnSignal( signal ):
  pass

def OnRun():
  pass

comp = getComponent()
exe = comp.findBehaviour('Executor')
program = exe.Program
rou = program.MainRoutine
num = 0
for i in rou.Statements[0].Positions:
  i.Id = str(num)
  print i.Id
  num+=1

What I did here was change the names to numbers, you can also read the csv to rename them.

Hi, BAD

I actually want to change P1, P2 and so on to something like pStart, pEnd. So when I post process my program, it reflects those names. As I mentioned, for normal PTP and LIN statements I managed to use the Set Point Names command and it worked. But I wasn’t able to figure out a way to change the names of the welding statement points.

is .Positions a property from vcPositionStatement, right?

hi,gomes!
I’m sorry I can’t do some attempts with VC on short notice since I’m off work, but I’m pretty sure that I can’t read this Name property with the Python API in anything other than a post-processing compiled file (at least I haven’t succeeded so far).
If it were me, I’d try modifying the contents of the post-processing compilation file so that the output Name points to the ID, or more complexly, make an iterative program to get the cPoint yourself (if you’ve looked through the post-processing compilation file, you’ll know what I’m talking about) and then finish the thing off with your own attributes.

.Positions is indeed a property of vcPositionStatement that points to points inside the welding statement.
For the reasons I stated above, so it may be necessary for you to make your own attempts, and I hope the process goes well for you!

(Message: Oh yes, I vaguely remember that one of the properties of those points is related to “P1” and “P2”. But since I’m not quite sure if my memory is correct, good luck!)

I made an attempt to find out that my previous statement about being able to influence the final output name in a property was wrong (of course, I wasn’t sure if this memory point was correct in the first place). However, I looked at the robot post-processor and found that with regards to the final output name (cPoint.Name), it’s a composite variable consisting of the name of the parent statement + “_” + the sequence number, which means that if you want to change the final name, it’s best to change the contents of the robot post-processor first to do so.