160 likes | 188 Views
Learn how to generate a list of variables with initial values from UAG, customize exported XML using nxslt.exe, and import back into UAG. Follow detailed steps for Windows setup and usage.
E N D
Unity Application Generator How Can I… Generate a variable List from UAG with Initial values using nxslt.exe
Issue • I want to generate a list of certain variables from UAG with initial values. • I should be able to change the initial values of the variables and import them back into the UAG.
How to do..Basic explanation • UAG supports exporting of project using XML and text format. • The format of the exported file with XML can be customized using style sheet. • Generation of the a text file can be done by: • Exporting the project in XML format. • By using standard tool for transforming the XML file into text file with pre defined format can be done by using standard software utilities like nxslt.exe. • Using this utility and style sheet, the exported file from UAG can be transformed into text file with required format.
How to do..In Windows • Create a file named “conv” on the “C:” root • Copy “nxslt.exe” and “PALInitialvalues.xsl” from archive into the folder “conv”. • Create an “transformPAL.cmd shortcut” on the desktop. This command file is available in the archived file. • From UAG export, the section of the project from where, the list hs to be extracted into c:\conv • Drag and drop UAG export file on the “transformPAL.cmd shortcut” on the desktop. • This will create a text file with required variables along with initial values.
In Windows, on “c” drive, please create a folder “conv” How to do..In Windows
How to do..In Windows • Copy these files : • “nxslt.exe”, • “PALInitialvalues.xsl” • “transformPAL.cmd” Into the folder “conv” Note: In this style sheet, we are extracting variables “Ctrl,Stat1, Stat2,LFWD,InfoShortName” from following two SCODs “MOT1D1S_XML,OPMODE_P10”. Please open the style sheet with any editor to have more details
How to do..In Windows • Create a shortcut of a “tranformPAL.cmd” in desktop of your computer
How to do..In UAG • Open an UAG project and ensure that there are control modules using the SCODs in the style sheet: in this case, please ensure that control modules with SCODs “MOT1D1S_XML” and “OPMODE_P10”are used. • Note: If those SCODs are not available then replace the SCOD name in the style sheet with the SCODs which are available in your project.
How to do..In UAG • Export the project ..
How to do..In UAG • …on the “conv” document • Chose an export file name
How to do..In UAG • After a success export…
How to do..In UAG • …file was created in a “conv” document here
How to do..In UAG • In the CONV folder, drag the exported file and..
How to do..In UAG • … and drop on the shortcut “transformPAL”
How to do..In UAG • A windows appear, the conversion work • When its done press a key
How to do..In UAG • A file “PALUAG.txt” will be created in folder “conv”. • The file should look like this: • Modify the initial value and import back into the UAG • NOTE: The path and the name of exported file can be modified by: • Right Click on the cmd file (transformPAL.cmd) • Change the word in BOLD on the command line : “nxslt.exe %1 PALInitialvalues.xsl -o c:\conv\PALUAG.txt”