I have a situation where I need to insert external gcode into a NX Cam Tape. I can think of three ways to do this:
1) Edit the tape after posting (undesirable since this would have to be done every time I post)
2) Use some kind of a UDE command to key the Post to input the contents of an external file.
3) Use an NXOpen command to read an external file and input its contents into a UDE using Insert statements.
I am not fond of #1 becaust it leaves the possibility that I could forget to do the edit and thus not get the desired result.
I would much prefer to use 2 or 3 for this but I do not know how to accomplish this. Does any one know of any samples that do something like this. I am currently having to put each line of gcode into a series of insert statements manually and this works fine for small snippits but it is a lot of work and prone to mistakes when you have a lot of external gcode.
In case you are wondering the external gcode is something that NX is unable to produce itself and it is proven to work well so inserting it directly into the tape is a safe and desirable option.
I am using NX9 and PostBuilder Post for this.
Any Ideas or Thoughts would be appreciated.
Solved! Go to Solution.
For me very easy way#3 - NXOPEN application, I need just file name with path to this file. I will read this file line-by-line and output each line as string to output file (nc_prog)....
Production: NX 12.0.1
Development: C#, Tcl/Tk, CSE
If you convert your G code file to CLS format you can can import it into NX using "Tools -> CLSF -> Import". From there you can assign a tool and MCS so you can verify, move and post like other operations. Some other CAM systems can post to an APT format which should be close CLS format. A little bit of work but may be worth it.
I used to have a GRIP program that would take a text file and import it into a machine control operation. I will see if I can find the source. Unfortunatly we do not have a GRIP development license so I cannot compile it.