on ‎2014 Dec 01 8:07 PM
Hi,
I want to user the standard Windows environment variable %USERPROFILE% in PD.
How to do that, somehow it dosn't work for me ... I have tried to define it in the:
1. General Optios -> Variables as a new variable USERPROFILE
2. Use it in the Named Paths to reference f.e. extensions
Most probably the syntax I'm unsing is a wrong one ...
What's the syntax if I want to create a new variable and what's the syntax if I want to reuse one in the Named Paths .. f.e.
Name Path Comment
_ICONS is defined as %USERPROFILE%\BPM\8 Icons\
And I would assume, I can somehowe reuse the standard windows variables like USERPROFILE etc.?
Thanks,
Rafal
Request clarification before answering.
In PD help it says this about environment variables:
To use a variable in GTL (see Customizing and Extending PowerDesigner > Customizing Generation with GTL ), prefix it with a dollar sign, and wrap it in percent signs. For example,
%$CMD%.Does this help?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The following GTL should work:
.vbscript
Dim wshShell
set wshShell = CreateObject("WScript.Shell")
ScriptResult=wshShell.ExpandEnvironmentStrings( "%USERPROFILE%" )
.endvbscript
You can alter as necessary into a normal VBScript or method.
You do not need to define any environment variables in PD paths.
Chris
Anyone?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.