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 Objects with Links
Topic Summary:
Created On: 14-Sep-2004 15:09
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 Antonio Norkus, on Tuesday, September 14, 2004 3:45 PM

Answer:
You could try using the function flushDeletions, though I'm not sure whether it applies to link deletions.

This function commits any deletions performed by the DXL script...usually this is done at the end of the DXL script, which may be the reason why you can delete the object manually at that point.

Antonio.
 14-Sep-2004 15:09
User is offline View Users Profile Print this message


Maria Manco

Posts: 12
Joined: 21-Jul-2004

We are trying to delete an object with links.
Here is the code.

Link lnk
string strSourceModName
Module srcMod
for lnk in obj -> "*" do
{
delete lnk
}
for lnk in obj <- "*" do
{
Object src = source (lnk)
strSourceModName = fullName source (lnk)
if (!open module strSourceModName)
{
srcMod = edit(strSourceModName, false)
if (!null srcMod)
delete lnk
else
ack "Could not delete in-links! Test Module is open exclusive."
}
else
{
delete lnk
lnk = null
}
}
for lnk in obj <- "*" do
{
Object o = source (lnk)
//print "Found an inlink!" number(o) "\n"
delete lnk
lnk = null
}
save(current Module)
delete obj


Here is the error we are getting.

Found an inlink!2.1.2.9.0-1
-R-E- DXL: <Line:338> cannot delete Object: object has incoming links


When in the module, the object shows no links!
We can also manually delete the object at this point.

We also tried deleting from the source first and this did not help.
Anyone got any ideas?
Thanks!

-------------------------
Hello
Report this to a Moderator Report this to a Moderator
 14-Sep-2004 15:29
User is offline View Users Profile Print this message


Antonio Norkus

Posts: 109
Joined: 28-Jun-2003

Answer Answer
You could try using the function flushDeletions, though I'm not sure whether it applies to link deletions.

This function commits any deletions performed by the DXL script...usually this is done at the end of the DXL script, which may be the reason why you can delete the object manually at that point.

Antonio.
Report this to a Moderator Report this to a Moderator
 14-Sep-2004 15:46
User is offline View Users Profile Print this message


Maria Manco

Posts: 12
Joined: 21-Jul-2004

That solved the problem we were having! Thanks for your help!

-------------------------
Hello
Report this to a Moderator Report this to a Moderator
 14-Sep-2004 16:11
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Besides flush deletions you also have the problem that your source modules may NOT get loaded. You need a "for linkRef in obj<"*" loop to find the names, and open the other module that way. That's standard when dealing with incoming links.

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