I'm trying to split a compound operation by copying the sub-operations into a list and pasting them into a new operation.
The new operation is created as a TxGenericRoboticOperation, although the sub-operations have come from different compound operation types.
The problem is that the CanPasteList method returns false if the list contains particular subtypes (e.g. TxWeldLocationOperation). Real robot programs are not limited to particular subsets of instructions - is there compound operation type which is can accept the full range of operations?
The code (VB), is
Private Sub CreateSegment(Segments As List(Of ITxRoboticOrderedCompoundOperation), OpsList As TxObjectList, progname As String, ByRef log As String, level As Integer)
Dim grocd As New TxGenericRoboticOperationCreationData(progname & "_copy")
Dim NewSegment = TxApplication.ActiveDocument.OperationRoot.CreateGenericRoboticOperation(grocd)
If NewSegment.CanPasteList(OpsList) Then
log = log & Space(level * Indent) & "Unable to paste operation into segment "