I am using a PythonProcessHandler to update a create statement in the process.
It needs to create different products depending on some input parameter.
I do not want to use long if statements in the UI, as I have many products and new ones are added regularly.
For assemblies, this creates “full” assembles.
But I need to have a partial assembly, as in the next step, a robot is placing the parts using a GetAssembly-> TransportIn sequence.
I can get the AssemblySteps
steps = createStatement.AssemblySteps
But this attribute is read-only.
How to set the assembly steps programatically?
That way they will not be there when the assembly is created. Use the filter function to make sure they only take the correct product. Hope this helps.
Thanks for the input @cassian35 , but this just creates another problem, that I had send to the VC support.
If I assemble an assembly, it does not get disabled anymore.
So, if I proceed as you propose, I create an assembly with no DefaultProductType at the upper level.
I fill it up with a GetAssembly->TransportIn sequence but then I do not get it disassemblied anymore…
My issue with the disassembly of previously assembled units is still not resolved, VC support could at least replicate it - but I finally got the missing code snippet. Hopefully this will be helpful for someone else in the future.
So, to define the included assembly steps in a createStatement:
First, get assembly information: