Extract Folder Names from Image Path

File Information

Description

This small example rule set extracts the folder name from the entire path where the first image of the scene is located.

Answers part of the following forum post:

http://community.definiens.com/user-forum/posts/beginners-questions/exporting-questions.html

This small rule set shows how to use and resolve export item variables and extract substrings with split_string to extract e.g. the folder name of an image from his complete path. In this example the path for the first layer is used and needs of course to be present

As separator '\' is used, means this works only for Windows OS.

Note that this rule set is using the "Resolve Path" feature coming with platform version 1.5.2.

Here a list of variables getting resolved with "Resolve Path":
"{:Workspc.Name}" - name of the workspace
"{:Workspc.Guid}" - GUID of the workspace
"{:Workspc.Dir}" - path of the workspace file
"{:Project.Name}" - name of the scene (absolute in the workspace)
"{:Project.Guid}" - guid of the scene
"{:Scene.Dir}" - directory of the scene
"{:Scene.Name}" - name of the scene
"{:ImgLayer(n).Dir}" - path to the input image layer n
"{:Workspc.OutputRoot}" - path of the output root
"{:Workspc.InputRoot}" - path of the input root
"{:ActionLib.Dir}" - directory of the action library (if any)
"{:Variable:abcde}" - value of variable abcde
"{:Application.Dir}" - directory of the loaded application/portal (if any)

All workspace items can be only resolved if a workspace is present.

Software Version
Definiens Developer XD - 1.5
Categories
Other
Files in Rule Set
  • ResolvePath_FolderName.dcp(16.7 KB )
  • For downloading this file, please login or sign up for a new account.
Views
629
Downloads
8
Created
06/08/2011

User Information

Please log in to comment on this rule set or to download the attached files.

If you do not have an account please register here.

Comments

This rule set has not been commented yet.