Universal Robots SDK documentation
Open and edit program and installation files
Decompile UR files like URP program and installation files
Decompile UR files like URP program and installation files
Edit program files
The library can open and edit program files with .urp extension. You can access and modify inner XML.
using System.Xml.Linq;using UnderAutomation.UniversalRobots.Files;class FileProgram{static void Main(string[] args){URProgram prg = URProgram.Load(@"C:\myPrg.urp");XElement innerXml = prg.XML;// Set program associated installation file// You can also add instructions or change other attributesinnerXml.Attribute("installationRelativePath").Value = "default";// Save modified program files// You could then transfer this file to the robot with SFTPprg.Save(@"C:\myPrg.urp");}}
Edit installation files
The library can open and edit installation files with .installation extension.
using System.Xml.Linq;using UnderAutomation.UniversalRobots.Files;class FileInstallation{static void Main(string[] args){URInstallation prg = URInstallation.Load(@"C:\default.installation");XElement innerXml = prg.XML;// Change your installation settingsinnerXml.Attribute("showSpeedSliderOnRunTab").Value = "true";// Save modified program files// You could then transfer this file to the robot with SFTPprg.Save(@"C:\default.installation");}}
Try it with the Windows example

API Reference
Contains basic methods to encode and decode a UR archive
| Member | Type | Description |
|---|---|---|
URArchive(XElement) Constructor | ||
Extension Property read only | string | |
FileName Property read only | string | File name that should be used on a UR robot |
Name Property | string | |
NameAttribute Property read only | string | |
RootElement Property read only | string | |
XML Property read only | XElement | XML description of the object |
Load(Stream) Method static | XElement | Load a UR archive from stream and decode it as XML |
Load(string) Method static | XElement | Load a UR archive from file path and decode it as XML |
Save(Stream) Method | void | Save encoded file to a stream |
Save(string) Method | string | Save encoded file to a directory, overwrite it if it exists
|
Functions to compile and decompile a *.urp program file
| Member | Type | Description |
|---|---|---|
URProgram(XElement) Constructor | Create a URProgram from its XML definition | |
Extension Property read only | string | |
NameAttribute Property read only | string | |
RootElement Property read only | string | |
EXTENSION Field | string | |
Load(Stream) Method static | URProgram | Load a program from stream |
Load(string) Method static | URProgram | Load a *.urp program from file path |
Functions to encode and decode a *.installation file
| Member | Type | Description |
|---|---|---|
URInstallation(XElement) Constructor | Create a URProgram from its XML definition | |
Extension Property read only | string | |
NameAttribute Property read only | string | |
RootElement Property read only | string | |
EXTENSION Field | string | |
Load(Stream) Method static | URInstallation | Load an installation file from stream |
Load(string) Method static | URInstallation | Load a *.installation file from path |