Showing results for 
Search instead for 
Do you mean 
Reply

C# Sample for create a CAM operation

I am an beginner of C# in NX program. Anyone can give a sample about how to create a new PlanarMill operation from template and add or modify part ,check geometry. Also sample for CavityMilling and PTP too.

very appreciate.

5 REPLIES

Re: C# Sample for create a CAM operation

The quickest way is to record a journal of creating a new operation.

This will give you a good starting point.

Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Lenovo ThinkPad W540, Win7, 16GB. Developing in: Java | C | C# | KF
Production: NX8.5.3.3 MP11 64bit Testing: NX9.0.2.5

Re: C# Sample for create a CAM operation

I try that. But I can't find any help about how to add or modify part boundary. Can you give me a sample demonstrate how to add or modify the part boundaries in NX7.5 operation by C#?

 

Thanks,

 

Sam

Re: C# Sample for create a CAM operation

Setting the part boundary is quite complicated, so I don't have the time right now to try and explain it all.

However, the only way I've found to deal with boundaries is using the wrappers for the UF functions. So a good way to learn is to go on the Solution Centre and look for some examples there (you'll need a WebKey to get in). Don't look for just C# examples as there will probably be more C examples, but you should be able to convert them to C# using UF wrappers fairly easily.

 

Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Lenovo ThinkPad W540, Win7, 16GB. Developing in: Java | C | C# | KF
Production: NX8.5.3.3 MP11 64bit Testing: NX9.0.2.5

Re: C# Sample for create a CAM operation

Hi Inch,

Thanks for you suggestion. That is a very good ideal to start with too. 

Setting the part boundary is complicated, that is what I thought after I tried the journal.

It will show on journal if it is easy(my guess). If someone can post a sample on here, that is very helpful for the new guys like me.

 

Thanks advance,

 

Re: C# Sample for create a CAM operation

When the boundary dialogs were updated in NX 8.5 and 9, this included journaling.

If you are using 7.5, you will need to use an older API like ufunc or grip.

 

BTW to see what is journaled, just start recording a journal, create the boundary or whatever else you want, stop recording, and then look at the journal. You will see the vb or whatever language you are set to.

Mark Rief
Retired Siemens