![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: How to get selected module in database or project window Topic Summary: Created On: 6-Apr-2004 08:29 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hi,
I try to make a DXL script that archives / restores a module with some additional information. I would like this script to run from the Database or Project window (the main window from which one can open modules). Does anyone know how to get the name/id of the selected (not opened) module? Mark |
|
![]() |
|
![]() |
|
Item getSelectedItem(void) will give you the item that is currently selected in the explorer window.
------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
It's nice that Telelogic has this function fully documented in the DOORS DXL Reference Manual.
![]() Do you know if it is possible to also set the currently selected item and refresh the project manager window to bring that item into view? I tried to change the value of the Item and use setSelectedItem(itm) but DOORS does not recognize the function call. -Dennis Edited: 6-Apr-2004 at 13:49 by Dennis Lockshine |
|
![]() |
|
![]() |
|
Doesn't look like it to me. refreshDBExplorer didn't work.
- Louie |
|
![]() |
|
![]() |
|
Folks,
How do some people get "undocumented" information? How much useful undocumented information is there? Who do I send a check to so I can get on the list? ![]() Anyway, Thank you for sharing Tony. That was very helpful. |
|
![]() |
|
![]() |
|
getSelectedItem gives you the first module in a selection. I'm missing a getNextSelectedItem for multiple selections! or at least a isSelected, that way you could loop through all of the modules in a Project and check...
Any suggestions? ------------------------- Kristian Bøe Extenda AB Kristian.Boe@extenda.se |
|
![]() |
|
![]() |
|
You can use the following to loop through the selected items in the database explorer list view (right hand pane).
string iName = "" for iName in dbExpList do { print(iName " is selected in list view\n") } You can use the following to get the selected item from the database explorer tree view (left hand pane). iName = get(dbExpTree) print(iName " is selected in tree view\n") dbExpList and dbExpTree are DBEs on the dbExplorer DB. I assume these are declared in the top context. The only place I have seen these used is in lib/dxl/config/baseWindowShow2.inc. ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
Using Tony's suggestion above regarding DB dbExpTree and DBE dbTreeView, I was able to answer my own question about how to select a given project or folder in the explorer window.
I was unsuccessful trying to set the given path at once, so to get it to work I had to successively select the next level item. See the attached code for an example. Thanks Tony! |
|
![]() |
|
![]() |
|
I have had limited success in using Dennis' code to set the currently selected item in the Database View. I want to have a button on a dialogue box that takes the user to a particular folder in a project. Sometimes the code works but most of the tmie it appears to do nothing.
Dennis - have you developed a better technique to achieve this? Has anyone else got a technique to do this? Any help would be much appreciated Thanks Dave |
|
![]() |
|
![]() |
|
Dave,
I have not done any further development of this technique. I have noticed, however, that the database view setting can have an effect on the results (View > Database View vs View > Project View). There are also issues if you have a Project embedded within a Project. If you are using the fullName(item) perm to get the absolute path, I recommend that you also experiment with using the unpublished rootName_(item) perm and see if you can produce better results. The former will give you the path from the parent project, and the latter will give you the path from the database root, which will be different for sub-projects. The code I posted over two years (!) ago needs to parse the path to the object and activate each portion of the path in turn, thus there should be a correlation between the database view and the path to the item. Good luck! -Dennis |
|
![]() |
|
![]() |
|
Hi Dennis,
late answer, but it could be the right one ![]() you can set the selected item in database treeview by using following statement: set (dbExpTree, "databasename/pathtoitem"); The variable dbExpTree is the DBE handle of the treeview in main window and it can be handled like a normal tree view ... Greetings Reik ------------------------- Evosoft GmbH for Siemens Industry Sector Berlin, Germany |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.