I have the problem, that I want to attach a component to another via a python script. I set it up as usual and did the coordinate transformation into the desired parent coordinate system. When I execute my script and perform a print(Parent.Name) command I also receive the correct name of the parent component.
But at the moment, my component still stays with the process node it was delivered to during a process flow. Somehow it does not detach correctly. Also, the software shows me that with displaying a light blue arrow pointing onto the process node origin.
Does someone know how to detach a component from a process node?
I don’t have VC to test it right now, so I might be wrong, but I think you need a ComponentContainer in your parent component and then use “grab” in python. The product will then be attached to the Container of the parent component.
If you can, please upload a demo so it’s easier to find the trouble spots.If you can, please upload a demo so it’s easier to find the trouble spots.
thank you very much for the help or the offer to help.
I managed to find a solution. Indead as Tilma pointed out an additional component container was necessary to keep the location of the parts. But what I did not expected was that the python script selected the worng part. Unfortunately I cannot show or share my current layout due to legal reasons since it is an industry project, but, what happend is, that in the 3D world I have a process node creating the part from where the human picks it up and transports it to the component I want it to be attached. Because the components are named the same at the process node where they are gnerated and at the location they are placed the python script selected the wrong part. This lead to a part stuck in the ground at Z = -800 or so. That is also the reason I missed it. So the python script worked but selected the wrong part. I manged to fix it by calling the part from the container of the process node to which the part is transported in the flow (Container.Components[0]).
Glad to hear you solved the problem, the fact is that there are so many possible causes of problems like this one that many times it needs to be checked, for example something like a secondary trigger from a script could also be a cause.