2009

Table Of Contents
%sourcepath This tag represents the full path and filename that the currently selected object comes
from. Even when a collection of model files have been combined into a single NWD file this tag will still
remember the path and filename of the original model file.
%currentpath - This tag represents the full path and filename of the currently loaded model. If you
currently have an NWF or NWD loaded that contains many other models it will just return the path and
filename of the top level NWF/NWD.
File/Path Manipulation Tags
%removeext("text") If the provided text includes a filename with an extension this tag will remove
the extension.
%removepath("text") If the provided text includes a path and filename this tag will remove the path
and just return the filename.
%poppath("text") If the provided text includes a path this tag will remove the top level. If it the text
also includes a filename that will count as the top level and be removed. For example,
%poppath(“c:\temp”) becomes c:\ and %popath(c:\temp\readme.txt”) becomes
c:\temp.
%pushpath("text1","text2") If text1 is a path and text2 is a file or folder name then text2 will be
added onto the path in text1. For example, %pushpath(“c:\test”,”model.nwd”) becomes
c:\test\model.nwd.
String Manipulation Tags
%join("text","text") This tag simply joins the two pieces of text together. For example,
%join(“c:\”,”model.nwd”) would return c:\model.nwd.
Note:
Tags must not contain white space between the brackets (unless enclosed by quote marks), so
%prop("EntityHandle","Value")
works, but
%prop("EntityHandle", "Value")
does not.
Examples
The examples below illustrate how tags could be used with SQL queries.
Selecting all columns from table Test whilst requiring that the column called Entity Handles matches a
category/property pair called Entity Handle/Value and the column called File Name matches the
original filename of the drawing:
DataTools
315