特殊変数Environment.CurrentDirectoryについて

こんばんは。
UiPath Studio 2024.10.6Community editionのユーザです。

特殊変数Environment.CurrentDirectoryについて教えてください。

デバッグ中にローカルパネルでString変数の値をみたら、

Environment.CurrentDirectory\Log\

などと文字列でEnvironment.CurrentDirectoryが入っていました。
これは、実行時にEnvironment.CurrentDirectoryがカレントディレクトリに変換されるのでしょうか。
それとも文字列Environment.CurrentDirectoryのまま?

@gorby,

At runtime this Environment.CurrentDirectory will return the path from where the package is running.

Like this.

Yes, it will be the path from where the package is executing.

こんにちは

上記の画像の状態ですと後者になります。
例えば代入アクティビティ等で

System.Environment.CurrentDirectory + "\ScreenShot\"

のようにする必要があります。

追加で教えてください。別の方が
Environment.CurrentDirectory
はPackageの配置場所だと言っていますが、それは誤りで、プロジェクトフォルダのパスという認識で合っていますか?

CurrentDirectoryなので現在のディレクトリが返ってきます。

Studioからの実行の場合、そのプロジェクトのproject.jsonがある場所になると思いますし、Assistantからの実行の場合は。%USERPROFILE%\.nuget\packages 以下の当該パッケージ・バージョンの場所になると思います。

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.