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 all unused Attribute Types in a module
Topic Summary:
Created On: 21-Oct-2008 14:44
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.
Answer This question was answered by David Pechacek, on Tuesday, October 21, 2008 4:14 PM

Answer:
Use the isUsed(AttrType at) command to check if the attribute type is in use before attempting to delete it.
 21-Oct-2008 14:44
User is offline View Users Profile Print this message


Mathias Burchardt

Posts: 21
Joined: 17-Sep-2008

Hi all,

I would like to delete all unused Types in various modules using DXL.
I tried attached code but receive an error message that the type is in use.

Does anybody know how to make DXL exclusively delete the unused Types (e.g. extend the if clause) or to ignore the error message (so that the script runs through)?

Thank you very much!
Best Regards

Mathias Burchardt
BeOne Hamburg GmbH
Report this to a Moderator Report this to a Moderator
 21-Oct-2008 14:53
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

The in use error means that there is an attribute using the type.

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
 21-Oct-2008 15:33
User is offline View Users Profile Print this message


Mathias Burchardt

Posts: 21
Joined: 17-Sep-2008

I know. I would like either to suppress that error message or extend the if clause in the code, that only the "unused" types will be deleted.
Rgds,
Mathias
Report this to a Moderator Report this to a Moderator
 21-Oct-2008 15:38
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

Answer Answer
Use the isUsed(AttrType at) command to check if the attribute type is in use before attempting to delete it.

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
 21-Oct-2008 16:15
User is offline View Users Profile Print this message


Mathias Burchardt

Posts: 21
Joined: 17-Sep-2008

Thanks - that was what I was looking for.
Mathias
Report this to a Moderator Report this to a Moderator
 21-Oct-2008 18:02
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Get used to trapping errors like this:
noError()
delete(at, e)
string ErrMess = lastError()
look at ErrMess.

In this particular case, you can ignore the error:
lastError()

- Louie
Report this to a Moderator Report this to a Moderator
 22-Oct-2008 15:39
User is offline View Users Profile Print this message


Mathias Burchardt

Posts: 21
Joined: 17-Sep-2008

Great function, Louie, thanks a lot!

Rgds
Mathias
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.