12-06-2021, 04:29 PM(This post was last modified: 12-06-2021, 05:14 PM byANDY_F1.)
Hi When running a program through a post processor, how do I determine the name of the current target within the MoveJ section of the post processor? I'm using the joints to add a joint command but want to change a parameter based on the name of the target within RDK 问候
Hi Oddly this doesn't work for joint moves where I've used the 'setInstruction' method in the C# API and modified a joint move - I set the desired name correctly and it shows in the tree in RDK. It appears to output the target name when I use AddTarget and create a MoveJ through the API, but not the setInstruction modification method.
I can see that it outputs the target name ahead of the call to the joint values in %temp% middle file - how do I grab that name in the post processor?
target_name = None if hasattr(self, '_TargetName'): # Check if the setting was enabled in robodk if self._TargetName is None: pass # This means the target has no name else: if type(self._TargetName) is list: target_name = self._TargetName[position].replace(' ','_') else: target_name = self._TargetName.replace(' ','_')
I'm not aware of the specific related to this programming method, but this is what I've been told to do in the post where I needed it and it worked, so... XD.
Jeremy
Find useful information about RoboDK and its features by visiting our2022世界杯32强赛程表时间
and by watching tutorials on ourYoutube Channel.
So if you modify an instruction through the API using setinstruction, and call it a joint move, passing through a name, it won't name it properly with a property that works for exporting to the PP, it only works through the API if you call AddMoveJ, seems to set the properties correctly.. would be good if this could be fixed...
Hi, in the image, the uncommented code works for the naming of joint names, the commented code appears to name it correctly but it's not passed through to the post processor