Cancel
Showing results for 
Search instead for 
Did you mean: 

Pasting operations into a compound operation

Hi,

 

 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
            NewSegment.Paste(OpsList)
        Else
            log = log & Space(level * Indent) & "Unable to paste operation into segment "
        End If
        OpsList.Clear()
Segments.Add(NewSegment) End Sub

 

 

 

1 REPLY

Re: Pasting operations into a compound operation

Siemens Experimenter Siemens Experimenter
Siemens Experimenter

Hi,

You can use TxCompoundOperation.

In the future you can create different kinds of operations and check in the Operation Tree which Operations can be moved manually to different scopes.

It is also recommended to consult the Tecnomatix Help file for more information on Operation types.