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: Deleting Multiple Objects
Topic Summary:
Created On: 3-Dec-2007 19:11
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.
 3-Dec-2007 19:11
User is offline View Users Profile Print this message


Al Almoian

Posts: 30
Joined: 26-Oct-2007

I need to delete multiple objects from a module. I flattened the module so every object is level 1 (No children). I run a filter to show all objects I want to delete. Can someone give me a dxl which will delete all displayed. (I will remove all links prior to deleting).
Thanks
Report this to a Moderator Report this to a Moderator
 3-Dec-2007 19:47
User is offline View Users Profile Print this message


Jeremy Eble

Posts: 30
Joined: 20-Sep-2002

I can tell you from experience that it would be much quicker to hold down the delete key than running a script to delete the objects. I would post the script I used to know this, but I can't find it right now.

-------------------------
Jeremy Eble
Software Engineer
Teragon Consulting LLC
jeremy.r.eble@lmco.com
Report this to a Moderator Report this to a Moderator
 4-Dec-2007 06:33
User is offline View Users Profile Print this message


Pekka Mäkinen

Posts: 276
Joined: 18-Mar-2004

In module select Tools / DXL Library. Browse to "Some example programs which illustrate..." and select the script "Example to delete all objects in display set (with links as well)".

-------------------------
Pekka.Makinen@softqa.fi
SoftQA Oy -http://www.softqa.fi/
Report this to a Moderator Report this to a Moderator
 4-Dec-2007 14:38
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

That example PURGES all the objects, not just delete's them.

It also fails if any of the objects have incoming links.

I didn't try it but suspect that script will have some trouble if Sorting is on, since its its main function deleteObj() recursively deletes children, and it looks like if a sort puts a child above the parent, the child won't exist anymore when you call deleteObj() for it.

Golly, I'm tired of looking at sub-par Telelogic written DXL.

- Louie
Report this to a Moderator Report this to a Moderator
 4-Dec-2007 16:13
User is offline View Users Profile Print this message


Pekka Mäkinen

Posts: 276
Joined: 18-Mar-2004

Yes you are correct - just looked into the include files, it does a harddelete. Maybe not so good example ;-)

-------------------------
Pekka.Makinen@softqa.fi
SoftQA Oy -http://www.softqa.fi/
Report this to a Moderator Report this to a Moderator
 6-Dec-2007 21:15
User is offline View Users Profile Print this message


Al Lione

Posts: 59
Joined: 13-Jul-2004

This should work to delete all displayed objects:

Object o
Module m = current
for o in m do
if (isVisible o)
delete o
Report this to a Moderator Report this to a Moderator
 7-Dec-2007 10:17
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Do not use delete(Object) as it does a hard delete.

Use softDelete(Object) to soft delete an object.

Use hardDelete(Object) to delete and purge an object.

-------------------------
Tony Goodman
http://www.smartdxl.com
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.