![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: DXL selection functions Topic Summary: Any known problems Created On: 28-Feb-2005 14:29 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hi all,
I am trying to process objects that are selected by the user in my DXL but so far not much luck. getSelection(module, &start, &finish) always places NULL pointers into the start and finish objects. and bool isSelected(obj) always returns 'false'. I have used the isSelected variety in an 'all' loop: for co in all(thisModule) do { if(isSelected(co)) { do stuff blah de blah... } } Any clues? Regards Ian Kirwan ------------------------- Principle Software Engineer Electrical Engineering Product Development MG Rover Group |
|
![]() |
|
![]() |
|
isSelected(obj) doesn't alway return true --
of course you have to be in an edit mode and you have to have the object select ie.., select shift and mouse select button will select a single object. |
|
![]() |
|
![]() |
|
Hi,
If you run the following code. It only prints if there is a multiple object selection. Surely if a single object is selected isSelected should return 'true'. Object co Module thisModule = current Module; for co in all(thisModule) do { if(isSelected(co)) { print "selected object\n" } } Cheers Ian ------------------------- Principle Software Engineer Electrical Engineering Product Development MG Rover Group |
|
![]() |
|
![]() |
|
the code printed when I selected a single object -- My guess is that you are not selecting the single object -- even though it is current object you still have to select it with the shift mouse select combination
|
|
![]() |
|
![]() |
|
Yes. Current is not also selected. You cannot select unless its open Share or Exclusive. If you DO select you don't just get what you selected you also get the common ancesorship of the two objects. IIRC you cannot select when its filtered or sorted.
Consider this: oCurr = current for obj in mod do { if (isSelected(obj) or obj == oCurr)) Yup, this object is selected. } never used that for all module loop. The above gets all displayed objects. for obj in entire mod will get all objects; which I routinely follows by "if (isDeleted(obj)) continue". - Louie |
|
![]() |
Telelogic DOORS
» General Discussion
»
DXL selection functions
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.