![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
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 |
![]() |
![]()
|
![]() |
|
Is this possible?
|
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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. |
|
![]() |
|
![]() |
|
Thanks for the replies. dxlHere will do
|
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.