Cancel
Showing results for 
Search instead for 
Did you mean: 

Create Item and create relationship with another Item

Hello everybody!

 

I use NX 11 managed mode.

Is it possible to create a custom Item (a type is existed in Teamcenter) via NXOpen and create relation with another Item?

 

With best regards,

Anton

3 REPLIES 3

Re: Create Item and create relationship with another Item

Legend
Legend

Hello @AntonKavalerov,

In general, you sould look at the NXOpen:Smiley TongueDM classes for these kinds of needs.

Regarding the need to create a custom item type, there isn't any problem with for example the part builders NXOpen:Smiley TongueDM:Smiley TongueartFromPartBuilder.

If you've got some need to impart part or dataset, you'll find some methods in NXOpen:Smiley TongueDM subclasses.

The need to create relation between two items is more tricky. As far as I know, you do not have any direct solution. When I encountered this need a while back ago, I had to use a custom ITK handler triggered by my NXOpen automation with UF_UGMGR_invoke_pdm_server().

It's not light but it's working really well.

Best regards,

Frédéric.

 

PS : the smiley stands for : and P, do not how to change this...

Re: Create Item and create relationship with another Item

Experimenter
Experimenter

Hello Frédéric,

 

I am very interested with your UF_UGMGR_invoke_pdm_server() method 

 

Could you give an overview of your construction ?

 

Best Regards

Re: Create Item and create relationship with another Item

Legend
Legend

Hi @Rouben,

 

There are two parts.

In NXOpen :

* Creation of a string with needed informations. For example, I gathered an Item, an ItemRev which where designed to be "receiving data", and another Item and ItemRev which where designed to be paster under a specific relation linked to the first Item. Moreover some part of that string contained data I wanted to store in a CSV Dataset in Teamcenter;

 

In ITK :

* Parse the string in order to understand data.

* Get back needed Item/ItemRev.

* Create a CSV based on sent information.

 

There might have been a more clever way especially regarding the full CSV information sending through this bridge. I think I recall the string you can send shoud be less than 600 characters. Yet, it worked for me.

 

This was before Nx11 and the implementation of NXOpen:Smiley TongueDM::FileManagement::ImportFilesAndCreateDatasets() which may fill your needs !

 

Best regards,

Frédéric.