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: Open Doors with vb in Read only mode
Topic Summary:
Created On: 11-Sep-2006 10:34
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.
 11-Sep-2006 10:34
User is offline View Users Profile Print this message


Michael Werner

Posts: 15
Joined: 29-May-2006

Hi, In the DXL-Referencemanual i have found the VB-Code to open Doors and run some DXL-Code. I use it to open a Module and scroll to a special Object. (We have a program to manage Testcases, and from where people want to be able to open the requirement related with that testcase) It works fine with one problem: The Modules are opened with Exclusive Edit Mode. Is there any way to pass the "-r o -R o" argument to Doors with vb? regards Michael
Report this to a Moderator Report this to a Moderator
 11-Sep-2006 14:37
User is offline View Users Profile Print this message


Octavian Stanescu

Posts: 39
Joined: 28-Feb-2005

Try only to open the module and stop after: Module m = read(PathToModule, true); Is this read only or exclusive edit? Also, I don't understand what this does: current = o; Octavian
Report this to a Moderator Report this to a Moderator
 11-Sep-2006 14:57
User is offline View Users Profile Print this message


Michael Werner

Posts: 15
Joined: 29-May-2006

current=o sets Object o as the current Object.
Maybe this is not necessary anymore, if scrolling does the same, but i am not sure because i haven't tested it.
m = read(PathToModule, true); is the readOnlyfunction, but the Module that is opened is in Exclusivemode anyway. Of course i can downgrade the Module with downgrade(m), but then the other Modules the User opens "by Hand" will be in Exclusivemode. An Alternative might me setting sth. global that has the "-r o -R o"-Effect.

regards Michael
Report this to a Moderator Report this to a Moderator
 11-Sep-2006 15:24
User is offline View Users Profile Print this message


Richard Good

Posts: 152
Joined: 22-Mar-2005

Michael,

You should use a shell command and pass your string to doors using the -D switch
something like: -

RetValue =shell("C:\\Prog Files...\\Doors.exe -r o -R O -D ""Your DXL Script"""

-------------------------
Regards,

Richard Good
Report this to a Moderator Report this to a Moderator
 11-Sep-2006 21:12
User is offline View Users Profile Print this message


Michael Werner

Posts: 15
Joined: 29-May-2006

Hi Richard,

thanks for the reply, this brought me to an idea. I think i will try to find out if Doors is running or not. If it is not running, i will start it via such a shellcommand if needed. When Doors is already running the
Set DOORSObj = CreateObject("DOORS.Application")
will use the existing Instance of Doors.

regards Michael


oh my god, dxl is already hunting me at night (22:00 CET)...
Report this to a Moderator Report this to a Moderator
 12-Sep-2006 00:27
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Open Mode:

Changing the default open behavior is highly desirable: [1] it stops folks who want to browse around from locking out other users [2] it discourages folks from accidentally making a change to a module.

The DOORS ERS Configuration tool lets you configure parameters for a client, in this case you want to change "defopenmode" to "READ_ONLY". That changes the behavior of a double-click to mean Read rather than the default Share. Also change "defopenlinkmode" to "READ_ONLY", that changes the open behavior of a module when you follow a link. READ_ONLY must be in upper case, but the names of the values can be upper or lower: dEfOpeNMoDe is oK.

Amish folks should start RegEdit.exe, go to "\HKEY_LOCAL_MACHINE\SOFTWARE\Telelogic\DOORS\7.1\Config" and add then modify "defopenmode" and "defopenlinkmode" to "READ_ONLY".

That should be done on all clients; in fact we force our clients to do so via Big Brother DXL.

VBA:

How about that, I did VBA work for just this purpose. It looks like this:
' If DOORS isn't running you'll get a VBA error
' User can then loginto DOORS and try this again
Set DOORSObj = CreateObject("DOORS.Application")
DOORSObj.runStr ("#include <c:\doors-stuff\VBS-Stuff\HyperlinkToObj.inc>; fHyperLinkToObj(""SSUP_3"", """")")

The include file is just DXL. Notice if DOORS isn't running you get an error but are prompted to log in. Your method of waiting 10 seconds may also work.

The include file method doesn't work so well. So I'd code the body of the include directly into the runStr command, being sure to use two-double quotes where you need just one in DSX (see the ""SSUP_3""...). You also may need to use two-ack slashes when you use one back slash in DXL. Anyway, that will make the code a LOT easier to read. Notice that I'm passing the parameter (in this case "SSUP_3") as a parameter to the search function (not shown, needs identifier as input). That's easier than passing parameters into the text via VBS.

If a module is already open Share or Edit, then DXL opening it "read" won't change it. An "edit" command when shared or a "share" command when edit will trigger a prompt; you'll also get a prompt if someone else has it shared or edited when you try to edit, or when they have it edit when you try to share. Thus, if your script results in an edited module its probably because its already edited by the user (even if invisible).

(Likewise if its invisible a "true" will cause it to become visible, but if its visible a "false" will NOT cause it to turn invisible.)

Your code should perhaps have a "refresh(m)" before halting.

- Louie
Report this to a Moderator Report this to a Moderator
 12-Sep-2006 08:15
User is offline View Users Profile Print this message


Michael Werner

Posts: 15
Joined: 29-May-2006

Hi Louie,

I Agree, that opening everything Read_Only is importtant. In Our Company is that done with the -r o -R o starting parameters in every link that starts Doors. Our Netinstall packages are configured to behave that way.

VBA:
in case Doors is not running, the Loginscreen occurs. But vba considers the CreateObject-Operation to be finished then, and carries on with the DXL-Script what fails because an not logged in user cannot run a script
I will try the refresh(m), but yet it has already worked fine in the tests we ran. Except the Edit Mode...
regards Michael
Report this to a Moderator Report this to a Moderator
 12-Sep-2006 21:11
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

I'm looking at the 'Using DOORS' manual chapter 'Summary of Command Line Switches'. I don't see the -r and -R switches. Perhaps your command lines (icon 'targets') should look like this:
<"../DOORS_8.1/bin/doors.exe" -o r -O r>

The problem with that method is that someone can easily use an icon that doesn't have those parameters, and will thus open stuff Shared or Edit.

refresh(m) may not be needed after the scrolling, I don't recall. Possibly the module is auto-refreshed when the DXL ends, I don't recall.

- Louie
Report this to a Moderator Report this to a Moderator
 12-Sep-2006 21:46
User is offline View Users Profile Print this message


Dan Hopping

Posts: 75
Joined: 21-Nov-2002

If you place the following code in a text editor then save it naming the file 'readonly.reg' then double ckick on the saved file. - the default open modes for DOORs modules will be changed to read only. (note: Registry entries will be created or edited)
Note: If you are running anything other than DOORs 8.0 change the HKEY path accordingly... Reboot after running to take effect...

Dan

----code follows-------

Windows Registry Editor Version 5.00

[HKEY_Local_Machine\Software\Telelogic\DOORS\8.0\Config]
"defopenmode" ="READ_ONLY"
"defopenlinkmode" ="READ_ONLY"
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.