cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a new Operation

Creator
Creator

Hello.

 

I'm new to .Net development for Process Sim

 

I'm trying to create a new operation and some operationlocations.

 

Dim rOpData As New TxGenericRoboticOperationCreationData("Operation1")
Dim rOp = TxApplication.ActiveDocument.OperationRoot.CreateGenericRoboticOperation(rOpData)

When I run these lines I get a TxUnknownErrorException and the method TxApplication.ActiveDocument.OperationRoot.CanCreateGenericRoboticOperation() allways returns false.

What am I doing wrong? And what is the procedure to create operations and locations?

8 REPLIES

Betreff: Creating a new Operation

Creator
Creator
Hello and welcome,

try please this code. I think it should go. Unfortunately I program in C #, but I programmed times and vb and can remember so dark turn.
 
Dim ActiveDocument As TxDocument
ActiveDocument = TxApplication.ActiveDocument

Dim OperationRoot As TxOperationRoot
OperationRoot = ActiveDocument.OperationRoot

Dim creationData As New TxGenericRoboticOperationCreationData()
'Optional you can define the name  
'Dim name As String
'Dim GenericRoboticOperationCreationData As New TxGenericRoboticOperationCreationData(name)

Dim GenericRoboticOperation As TxGenericRoboticOperation 
GenericRoboticOperation = OperationRoot.CreateGenericRoboticOperation(GenericRoboticOperationCreationData)

MFG

HenryM

Betreff: Creating a new Operation

Creator
Creator

Hello Henry,

Thanks for the reply. But no luck. Same problem as before Smiley Sad

Capture.PNG

 

Betreff: Creating a new Operation

Creator
Creator

Ok that's very interesting. I have just tested fast times the code and it works. What a Vesion Tecnomatix PS do you use? And you have also loaded a Study?

 

07-07-_2016_14-30-20.jpg

Regards

Henry

Betreff: Creating a new Operation

Creator
Creator

I'm Running PS 13.0 with Visual Studio 2012.

 I've loaded a *.psz-tc file with a station in PS standalone.

Is a study something else?
Capture1.PNG

Betreff: Creating a new Operation

Creator
Creator

Ok, I have to test again later. Unfortunately I have not worked with * .psz-tc.

Betreff: Creating a new Operation

Creator
Creator

Are you running Process Simulate on EMS or Team Center?

Betreff: Creating a new Operation

Creator
Creator
Just I use PS version 11.1 standalone and I loaded a PSZ.

Re: Creating a new Operation

Siemens Legend Siemens Legend
Siemens Legend

Hi,

 

In PS on Teamcenter platform you cannot create a Generic Robotic Operation directly under the Operation Root. Process Simulate operations are created under Teamcenter operations (there are some exceptions). You can create Generic Robotic Operation under a Teamcenter Operation. So in the data that you have you can select the "Weld" operation that is in the snapshot and cast it to ITxOperationCreation and then create the Generic Robotic Operation under it.

You can check that behavior when you select the Operation Root and then try to create a Generic Robotic Operation from Process Simulate UI (New Operation command), check that it is disabled for Generic Robotic Operation.