# G code .nc files reference numbers

**URL:** <https://forum.universal-robots.com/t/g-code-nc-files-reference-numbers/28343>\
**Category:** Technical Questions\
**Created:** [May 10, 2023, 4:24pm UTC](https://forum.universal-robots.com/t/g-code-nc-files-reference-numbers/28343 "2023-05-10T16:24:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![klemen.tomsic](https://avatars.discourse-cdn.com/v4/letter/k/3ab097/32.png) [@klemen.tomsic](https://forum.universal-robots.com/u/klemen.tomsic)\
**Post date:** [May 10, 2023, 4:24pm UTC](https://forum.universal-robots.com/t/g-code-nc-files-reference-numbers/28343/1 "2023-05-10T16:24:33Z")

</div>

Hi,

I am making a traceability feature in wrapper program to ensure a complete history of production process. To cover all the parameters I also need to get all .nc files that are used within the robot program. In example on your website there is a script which has a path to a .nc file:  
path\_id = mc\_load\_path(“/programs/myToolPathFile.nc”, use\_feedrate = False)  
mc\_add\_path(path\_id, acc\_factor, speed\_factor, blend\_rad\_toolpath)

From that kind of command in .script file I would be able to extract the path and the parameter for traceability would be covered. But in my case, since the robot program is generated in GUI, the commands looks like this:

# begin: URCap Program Node

# Source: Remote TCP & Toolpath, 1.3.0.build16, Universal Robots A/S

# Type: Toolpath Move

$ 8 “Toolpath\_MoveP”  
mc\_initialize(0, p[0.0,-0.055,0.2,-1.5707963267948966,0.0,0.0], 5) mc\_set\_pcs(p[-0.6381926120503243,0.03868983646696442,0.017249007420720303,1.4844129845367169,0.6166080386566236,0.620550136329594])  
id\_11\_1 = mc\_add\_path(0, 1.2, 0.2, 0.0)  
mc\_debugMsg("Toolpath\_1 is ID ", id\_11\_1)  
mc\_set\_pcs(p[0.0,0.0,0.0,0.0,0.0,0.0])  
mc\_last\_motion\_id = id\_11\_1

# begin: URCap Program Node

# Source: Remote TCP & Toolpath, 1.3.0.build16, Universal Robots A/S

# Type: Toolpath

$ 9 “Toolpath\_1”  
mc\_run\_motion(id\_11\_1)

# end: URCap Program Node

In command mc\_add\_path(0, 1.2, 0.2, 0.0), the number 0 represents a reference to the filepath of the .nc file. Where can I find the list of the references with the files?

Thank you.

Klemen

---

<div class="post-metadata">

**Author:** ![bema](https://avatars.discourse-cdn.com/v4/letter/b/ea5d25/32.png) [@bema](https://forum.universal-robots.com/u/bema)\
**Post date:** [May 12, 2023, 3:30pm UTC](https://forum.universal-robots.com/t/g-code-nc-files-reference-numbers/28343/2 "2023-05-12T15:30:58Z")

</div>

Hi Klemen,

As an option, please try the following process.

1. Save .urp file from robot filesystem (via magic file for example)
2. Change extension .urp → .gz
3. Open archive (via 7zip for example)
4. Open file in archive (via Notepad for example)
5. Search line: data key=“TOOLPATH\_NAME” value=“myToolPathFile\_.nc”

You should have the filename \> value= **myToolPathFile\_.nc**
