Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: get the directory where the doors script is being ran as a string?
Topic Summary: get the directory where the doors script is being ran as a string?
Created On: 12-Aug-2008 23:35
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 12-Aug-2008 23:35
User is offline View Users Profile Print this message


Kane Grzebielski

Posts: 19
Joined: 29-May-2008

Is this possible?
Report this to a Moderator Report this to a Moderator
 13-Aug-2008 09:03
User is offline View Users Profile Print this message


Tony Goodman

Posts: 97
Joined: 6-May-2008

You can get the full name of the dxl file being executed as follows:

string s = dxlHere()

-------------------------
Tony Goodman
Smart DXL limited
www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 13-Aug-2008 09:13
User is offline View Users Profile Print this message


Paul Howstan

Posts: 47
Joined: 27-Sep-2006

Hi Kane,

If the script is run using the Tools->Edit DXL menu, and then loaded from there, the currentDirectory perm will return the directory that the file was loaded from. However, I don't think this is the case if the script is run from a menu or if a different load directory is selected before runnig the script.

One possible way might be to use dxlHere in your script, then parse the returned string to get the file name from the backtrace. Not sure if this will work and its a bit wooley, but it might. Although I think this will only give you file names of include files and not the main dxl file.

There must be a simle way to do it, but I've not seen it yet.

Paul
Report this to a Moderator Report this to a Moderator
 13-Aug-2008 19:52
User is offline View Users Profile Print this message


Douglas Zawacki

Posts: 58
Joined: 17-Oct-2006

Kane,

Both Tony and Paul are somewhat correct. The dxlHere works only with files that were #included.

Documentation regarding dxlHere()
This returns the file and line of DXL code currently being executed. Useful for debugging DXL scripts. It only returns the file information for DXL scripts executed by using the #include mechanism.

Using the currentDirectory perm is another perm that usually works. Although, I have found that if you drag your dxl file onto the DXL Interaction window and run the script, the currentDirectory does seem to change.

The currentDirectory seems to work best by using the load button in the DXL Interaction for code that is not #included...for code that is #included the dxlHere() seems to work. If anyone knows of a more consistent way I'd be happy to hear about it myself.
Report this to a Moderator Report this to a Moderator
 13-Aug-2008 20:14
User is offline View Users Profile Print this message


Kane Grzebielski

Posts: 19
Joined: 29-May-2008

Thanks for the replies. dxlHere will do
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.