![]() |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Services > Tips & Tricks > Change Relative Paths |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
To access our tip & trick library, CLICK HERE. |
change relative pathsWant to change relative paths easily in Visual Integrator?Visual Integrator is a great tool for development of Integrator scripts that you may then want to move to a production server. Visual Integrator defaults to placing the full path in any file reference, so if you want to move the script to the server, or use relative paths in production, this might require a text editor. And later, if you wish to edit the script, Visual Integrator prefers the file references are reset to full paths. To make this process a breeze, create a parameter to reference the path. It is easily changed back and forth within Visual Integrator. To do this:1. Reference a filea. In a Visual Integrator object dialog, for example an INPT object with Input Type = Filein, browse to the input file, e.g. C:\DI_Project\Data\file.txt and click OK. b. Select and copy the project path from the input box, e.g. C:\DI_Project\ 2. Create the parametera. Go to Edit > PARMS b. Double-click in the white input box below Name c. Type the word, ”path” d. Double-click the input box under Default e. Paste the path string you copied from step 1 into the default |
3. Replace the path with the new parametera. Reopen the INPT object dialog b. Click to place your cursor inside the file input box and highlight the string to be replaced c. Right-click your mouse and use the pop-up dialog to select $(path) 4. Repeat step 3 for all object dialogs and file references5. When ready to move the script to production:a. Go to Edit > PARMS b. Double-click in the white input box below Name c. Double-click the input box under Default next to path d. Replace what’s there by typing: “../” 6. To return a script from production for editing:a. Open the script in Visual Integrator b. Go to Edit > PARMS c. Double-click in the white input box below Name d. Double-click the input box under Default next to path e. Replace what’s there by typing the path, in this example, C:\DI_Project\ |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||