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: DXL selection functions
Topic Summary: Any known problems
Created On: 28-Feb-2005 14:29
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.
 28-Feb-2005 14:29
User is offline View Users Profile Print this message


Ian Kirwan

Posts: 25
Joined: 17-Jun-2004

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
Report this to a Moderator Report this to a Moderator
 28-Feb-2005 14:44
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

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.
Report this to a Moderator Report this to a Moderator
 28-Feb-2005 14:53
User is offline View Users Profile Print this message


Ian Kirwan

Posts: 25
Joined: 17-Jun-2004

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
Report this to a Moderator Report this to a Moderator
 28-Feb-2005 21:42
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

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
Report this to a Moderator Report this to a Moderator
 2-Mar-2005 00:17
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

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
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 0 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 0 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.