Cancel
Showing results for 
Search instead for 
Did you mean: 

How to assign a weld point to a weld operation?

Valued Contributor
Valued Contributor

Hi ,

Is there a way to assign a weld point to a weld operation? I will appreciate for any reply.

14 REPLIES

Re: How to assign a weld point to a weld operation?

Legend
Legend

Hello @kx

 

Yes, there is. A weld point is automatic assign to the weld operation when you add the weld point projection to the operation. 

 

For doing that you can do the following:

 

1 - Create a weld operation (use ITxOperationCreation and TxWeldOperationCreationData classes to create a TxWeldOperation instance);

2 - Add all projections to a TxObjectList instance;

3 - Implement ITxObjectCollection from your TxWeldOperation object and add the elements from TxObjectList in the ITxObjectCollection

 

In the end, you'll have a weld operation with locations inside it which, in other words, means that you have assigned weld points to a weld operation.

 

Let me know if you have issues with the procedure above

 

Regards

 

Re: How to assign a weld point to a weld operation?

Valued Contributor
Valued Contributor

Hi @FredCastro

Thanks for you reply.

Can you tell me how to create a projection for a given weld point? I I tried to find the API to do this but failed.

 

Best regards,

KaiXuan

 

Re: How to assign a weld point to a weld operation?

Legend
Legend

Hello @kx

 

From WeldPoint you have WeldLocationOperations property where you can get the TxWeldLocationOperation. This is the object to be projected by calling Project() method.

 

Regards

Re: How to assign a weld point to a weld operation?

Valued Contributor
Valued Contributor

 

create_new_node.png

Hi @FredCastro, This is the first time I use tecnomatix, I am still in trouble with following the steps you provided.

Here is what I want to do.

1. I selected a WeldOperation

2. Create a new node "wp2100" in side MFGs of the selected WeldOperation by API, It is quite easy to do in Tecnomatix by dragging the weldpoint "wp2100" into the selected weld operation .

The code I have currently

 

 var weldOperation = operationList[0] as TxWeldOperation;
 if (weldOperation == null) return;
string pointName = "wp2100";
foreach (var o in TxApplication.ActiveDocument.MfgRoot)
{
	var wdp = o as TxWeldPoint;
	if (wdp != null && wdp.Name == pointName)
	{
		//How to add wdp into weldOperation's MFGs 
	}
}

I have got the instance of the selected TxWeldOperation and the weld point(wp2100).

 

Can you tell me the details of adding wp2100 into MFGs of the selected weld operation? 

Many thanks in advance.

 

Best regards,

Kaixuan 

 

Re: How to assign a weld point to a weld operation?

Legend
Legend

Hello @kx

 

 The direct assignment using Navigation Tree (where you drag and drop mfgs) it's a little bit different from what I'm telling you to do, because in this case you're working with the planning representation of the object. This probably can be held using Tecnomatix.Planning library.

 

Using the engineering representation of the object can be held by assigning the weldLocation (not the weldPoint) to the weldOperation. Following your code, you can try add the following line inside your last if block and see if it works:

 

weldOperation.AddObject(wdp.WeldLocationOperations[0] as TxWeldLocationOperation);

Check if the loaded weld operation has the weld location inside of it. After updating the eMServer you'll probably have the assignment completed in your navigation tree object.

 

Regards

 

 

Re: How to assign a weld point to a weld operation?

Valued Contributor
Valued Contributor

Hi @FredCastro

The code works well. Now I can see the new MFG node for  "weldoperation" in Relation viewer. It is so exciting.

created.png

I meet a new problem that I cannt save this node, in other words, the node is gone after restarting Tenomatix even through I have done "Save Secnario"

 

I tried the following code to update eMserver but saving is still not working

 

TxEmsGlobalServicesProvider emsServices=TxApplication.ActiveDocument.PlatformGlobalServicesProvider as TxEmsGlobalServicesProvider; 
emsServices.ExportAllModifiedFields()

I noticed a difference: the wp2100's "Process Tab" is still empty with API, on the other hand, the "process Tab" include "weldoperation" after drag and drop. I am not sure if the difference is the caused reason of saving failure. I will appreciate for any suggestion.

 

api.png

drag.png

 

Best regards,

Kaixuan

Re: How to assign a weld point to a weld operation?

Legend
Legend

Try using "update EMServer" command (and check the operation option) instead your emServices API, maybe your call to ExportAllModifiededFields is not working, but I'm not quite sure why.

 

When you work with navigation tree you're working directly with planning representation, that's why you get the result instantly, while the API is working with engineering representation, so you'll need an update call

 

Regards

 

 

 

 

Re: How to assign a weld point to a weld operation?

Valued Contributor
Valued Contributor

Hi @FredCastro

Try using "update EMServer" command (and check the operation option) 


I tried sereral ways but was able to find out how to use this command. Can you provide more detailed step? Thanks a lot.

Best Regards

KaiXuan

Re: How to assign a weld point to a weld operation?

Legend
Legend

update.jpg

After having the weld point assigned to the weld operation, try to run the command above and after that check if the object is now assigned correctly when you load it again