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: Error: "could not open include file"
Topic Summary:
Created On: 1-Aug-2007 00:23
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 Louie Landale, on Wednesday, August 1, 2007 8:07 PM

Answer:
Surprised me, but the following seems to trap Attr-DXL errors when you open a module:
noError()
read(NameMod, true)
string ErrMess = lastError
print "ErrMess = <" ErrMess ">\n"

This doesn't trap errors in Layouts in the default view, however. Don't know what to think about that.

- Louie
 1-Aug-2007 00:23
User is offline View Users Profile Print this message


William Kim

Posts: 8
Joined: 12-Feb-2007

I am running a script that loads the paths for the modules in our DOORS database into an Array:fficeffice" />>>

>

Array modulePath = create (100,1)>>

string path01 = "/path/path...">>

string path02 = "/path/path...">>

string path03 = "/path/path...">>

> >

put (modulePath, path01, 0, 0)>>

put (modulePath, path02, 1, 0)>>

put (modulePath, path03, 2, 0)>>

>

The Array is then used to read the modules and the object is tested for being a requirement:>>

>

Module m>>

Object o>>

string txt>>

>

for i in 0 : 3 do {>>

            m = read (get(modulePath, i, 0), false)>>

> >

for o in m do {>>

            txt = o."Object Text">>

            if (matches("shall",lower txt))  {>>

                        print identifier(o) "\t" "Yes" "\n" >>

                        } else {>>

                        print identifier(o) "\t" "No" "\n"        >>

            }>>

}>>

}

Somewhere during execution, I get a error:

-E- DXL: <Line:1> could not open include file (addins/user/cnvlayout.inc) (No such file or directory)>>

-I- DXL: all done with 1 error and 0 warnings>>

>

As one can see, there are no references to an include file.>>

>

Can someone please help me understand why this error occurs?>>

>

Thank you,>>

>

Willie>>

>

:
Report this to a Moderator Report this to a Moderator
 1-Aug-2007 01:23
User is offline View Users Profile Print this message


William Kim

Posts: 8
Joined: 12-Feb-2007

UPDATE:

I found the cause of the error and it is not because of my script.

Apparently there are some modules within our DOORS database that automatically call a dxl script when opened.  The script that runs has an error which causes the message.

Is there a way to disable the automatic running of a script when a module is opened?

Thank you,

Willie
Report this to a Moderator Report this to a Moderator
 1-Aug-2007 01:40
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Scripts running when you open a module are one of these 3 thiings [1] Attr DXL [2] Layout DXL in the default view [3] an open-module trigger.

[1] The Edit Attributes dialog doesn't tell you which attributes are really Attr-DXL. You should select each attribute and edit it, and look to see if the "DXL Attribute" box is selected.

[2] Select each column in the view that's loaded, check its properties, and see if its a layout.

[3] This is tricky since there is no GUI for Triggers. The trigger may be stored in the module and works only for that module, it may be stored in the project and work on lots of modules or just that module; and it may be stored in the database. Most likely its in the module. Try the attached (which I didn't debug).

- Louie
Report this to a Moderator Report this to a Moderator
 1-Aug-2007 09:29
User is offline View Users Profile Print this message


Peter Albert

Posts: 232
Joined: 30-Dec-2005

As Louie said, triggers are a bit hard to find sneaking around in the dusty corners of DOORS. Which is why I quickly hacked the attached dialog box tool a while ago, which can list all triggers in the current module, project and database, delete all triggers, or delete specified triggers.

Nothing fancy, but it can probably help find the trigger causing your problem.

Cheers,

Peter
Report this to a Moderator Report this to a Moderator
 1-Aug-2007 15:44
User is offline View Users Profile Print this message


William Kim

Posts: 8
Joined: 12-Feb-2007

Hi Louie,

Thank you for your reply.

Yes, there are two Attributes with the "DXL Attribute" box is selected.

Since I am not an Admin, is there a way to run my script without having these Attr-DXLs enabled when I read the Module?

Currently, when I run my script, the "DXL Error" dialog box pops-up which I have to manually acknowledge.  If these dialog boxes can be disabled or if there is a DXL command to close them, I think I can then proceed with running my script without interruption.

Willie
Report this to a Moderator Report this to a Moderator
 1-Aug-2007 17:31
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Answer Answer
Surprised me, but the following seems to trap Attr-DXL errors when you open a module:
noError()
read(NameMod, true)
string ErrMess = lastError
print "ErrMess = <" ErrMess ">\n"

This doesn't trap errors in Layouts in the default view, however. Don't know what to think about that.

- Louie
Report this to a Moderator Report this to a Moderator
 1-Aug-2007 19:01
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

I do wish there was a way to disable triggers when opening a module. But unfortunately, there isn't as far as I know. Submit those enhancement requests! They'll likely ignore them. But hey, you'll feel better.

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
 6-Aug-2007 11:58
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

You can check for bad Layout DXL using my script which is posted here.
This script gets round the annoying problem of noError() not preventing errors caused by layout DXL in the default view when opening a module.

You can disable triggers using Louie's excellent script which is posted here.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 8-Aug-2007 15:38
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Good news. Played around to see if the trigger itself can figure out if its currently being run on an open baseline. It has 3 tests. Pick a module that has a baseline. Open that module Exclusive, run the attached opting to yes deploy the trigger, and save the module. Close the module.

Open the module Read. The first test [1] should reveal that the version is empty, looks like <> in the dialog, indicating the trigger fires on an latest version of the module. The [2] anbd [3] tests should show likewise.

Open a baseline of that module. File>Baselines >View.... The [1] test should reveal a baseline, perhaps looks like <0.1>. The [2] and [3] tests however suggest its the latest version.

Therefore the following code in the trigger will prevent the trigger from running when you open a baseline:
Trigger tCurr = current
ModuleVersion mvTrig = version(tCurr)
string VersionStr = versionString(mvTrig)
if (!null VersionStr)
then halt, this is running from an open baseline
else proceed, this is running from the current version of the module.

You probably want an additional check:
Module mCurr = current
if (!isVisible(mCurr))
then halt, don't run on invisible module
else proceed, run on visible module

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