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: recreate the main column in a layout trace column
Topic Summary: recreate the main column in a layout trace column
Created On: 28-Sep-2006 16:48
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.
 28-Sep-2006 16:48
User is offline View Users Profile Print this message


Janet Ma

Posts: 115
Joined: 12-Sep-2002

I need to create a layout trace column that will retain the formatted look of the main column, but have some smarts to pull in information from the CP partner based on some rules.
We want to present a "future" view of the document before we apply the CPs so the authors can review it.
has anybody done this before.
Report this to a Moderator Report this to a Moderator
 28-Sep-2006 21:00
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Layouts byte. I've got a script that we ran nightly that gathered info of all linked and active CPs to an object and inserted the summary into a text attribute that exists only for that purpose. Thus, folks could see the CP status of an object as it was last night.

Layouts of linked partner objects Byte the big one. Expect excessive delays while each link is traversed for each object every time you scroll or redisplay the module.

- Louie
Report this to a Moderator Report this to a Moderator
 29-Sep-2006 09:41
User is offline View Users Profile Print this message


Andrew Tagg

Posts: 151
Joined: 26-Oct-2004

I have done something similar that uses a 'plain' attribute to store the text, and uses a trigger to update the text, so as to avoid the scrolling delays. The trigger is an object sync trigger that fires once you enter the object, so objects that are not double clicked will not update. I guess you have to think of how much this attribute needs to be updated, live, hourly, overnight etc. In my case the info at the other end of the link is unlikely to change very often, so this solution works for us in this particular case. Reply if this is of interest and I can post the code.

-------------------------
Andrew Tagg
Thales Air Systems, Melbourne
Australia.
andrew.tagg@thalesatm.com
Report this to a Moderator Report this to a Moderator
 29-Sep-2006 13:25
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

The following Layout DXL displays the object heading and text in the same format as the main column.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 29-Sep-2006 18:43
User is offline View Users Profile Print this message


Janet Ma

Posts: 115
Joined: 12-Sep-2002

Hi Tony:
Yes, I found another related thread on thisand implemented this solution, but unfortunately, I cannot export the column into word because of the DBE. The export function gives me an error.
Is there any workaround for it?
Report this to a Moderator Report this to a Moderator
 29-Sep-2006 18:44
User is offline View Users Profile Print this message


Janet Ma

Posts: 115
Joined: 12-Sep-2002

Andrew:
Can you send me the code, I want to avoid dumping any information into another module.
Report this to a Moderator Report this to a Moderator
 29-Sep-2006 19:36
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Don't you want a post-attribute-save trigger assigned to Object Text, that takes the raw text of the object and inserts it into your new attribute? Then the trigger fires when-and-only-when Object Text changes, which is exactly what you want.
Report this to a Moderator Report this to a Moderator
 2-Oct-2006 10:38
User is offline View Users Profile Print this message


Andrew Tagg

Posts: 151
Joined: 26-Oct-2004

Here is the code I am using for my triggered attribute:

The scenario is as follows, I have 2 modules, lets call them 'A' and 'B'. I have links form the objects in 'B' going back to 'A', and I want to display the object text from 'A' in an attribute of the 'B' module.  

|A|<--------|B| 

The attribute will only update when someone double clicks on the object (or click and press enter).

If it turns out that someone has removed a link, then the attribute will be set back to a null string.

There are 2 code snippets, the first needs to be run from the Project to set up the trigger, the second is the code that the trigger will run.

BTW, if anyone has tips to speed up this code, I'd be more than happy, I'm pretty much self taught so dont know all the cool tricks just yet.

-------------------------
Andrew Tagg
Thales Air Systems, Melbourne
Australia.
andrew.tagg@thalesatm.com
Report this to a Moderator Report this to a Moderator
 3-Oct-2006 13:32
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Janet, you are correct in stating that you cannot print or export data if it is being displayed in a canvas.

If it is a Word document you are after then why not modify a copy of the Word exporter?
Just find to place where it exports Object Heading and Text and insert your smarts instead.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 3-Oct-2006 22:42
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Aaaaaaaaa Ha!

The trigger fires when someone clicks on an object, it has nothing to do with double clicking. Actually, it fires BEFORE you click which probably means BEFORE that object becomes current. That's curious. And since you are obviously have no intention of preventing the click you should make this a post-event trigger, not a pre-event one.

If you use these object or attribute triggers, its like layout or attr DXL: you intend to work with that particular object. Your for object in module loop is out of context for this type of trigger (for one thing, you'll loop through the module each time you click a new object). This gets a little sticky since the 'object(trig)' function returns the object to which the trigger applies (not the object that triggered the trigger), and the current(Object) may not be the right one either.

The 'module(trigg)' function likewise returns the module name or handle where the trigger is stored. If you made this a project trigger it would return null, even though its running in a module. You'd have to use current Module instead.

It appears you want to follow outlinks, get the info from the target of the link, and store it in this module.

Forget all that.

I suggest a post-module-open trigger. The trigger can get the current Module, and if its open Edit then proceed otherwise halt. Update your MyOutLinkText attribute with the code you have.

I see that you are failing to accumulate the text of your linked partner objects. The code as written will erase the text of all linked objects except that last one. Instead of setting disp, put it in a buffer with a trailing EOL, after the object loop set the attribute from the buffer.

I don't see the benefit of checking for a null value first. Just ignore the current value and overwrite it with the new calculated value.

NitPicks:
[] you probably want to build a likeness of the object. If Heading isn't null then tack on the Paragraph number, and in any case tack on the Object Text. My such synopsis include whether the target is deleted, whether it has an OLE diagram, and a couple other things.
[] You probably want to truncate the text since objects with perhaps 20 outlinks will make a hopelessly complicated display.
[] Your snippette 1 should routinely prompt the user to delete the trigger as well, thus the code that deploys it can also delete it (the delete parameters are almost the same as the create parameters). If you figure to modify the particulars of a trigger (like its name), first delete it, THEN modify the code. I'd keep a copy of such old code around just in case. Failing to have delete code means you have to write special code in the future to remove it. I've played with the notion of having all my triggers check some Config file to figure out if the trigger should remove itself, but that was getting out of hand even for me!

- Louie
Report this to a Moderator Report this to a Moderator
 9-Oct-2006 22:47
User is offline View Users Profile Print this message


Kent Power

Posts: 18
Joined: 28-Apr-2005

Don't forget that attributes have a byte limitation (900 bytes or so, I think), which is shortened even more if rich text is used.  The Object Text attribute, though, has no size limitation.
Report this to a Moderator Report this to a Moderator
 10-Oct-2006 09:57
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

The following gives you the exact limitation for string attributes:

print maximumAttributeLength ""

On my machine this is 968. That's characters, not bytes.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 10-Oct-2006 12:35
User is offline View Users Profile Print this message


Andrew Tagg

Posts: 151
Joined: 26-Oct-2004

If my users write requirements longer than 968 chars they will be getting a nasty phone call from me before their fisrt coffee of the morning ;-)

-------------------------
Andrew Tagg
Thales Air Systems, Melbourne
Australia.
andrew.tagg@thalesatm.com
Report this to a Moderator Report this to a Moderator
 13-Oct-2006 09:56
User is offline View Users Profile Print this message


Andrew Tagg

Posts: 151
Joined: 26-Oct-2004

Janet, be aware that you cannot display tables within a layout DXL column, so if your modules contain tables then this avenue will be limited straight away.

I am facing exactly the same issue at the moment, my latest idea is to use the 'current' baseline as the 'preview' of the module, and use DOORS baselines as the 'already accepted' versions.

Check this strand for progress https://support.telelogic.com/en/doors/forums/messageview.cfm?catid=17&threadid=3914&enterthread=y

Rgds
Andrew.

-------------------------
Andrew Tagg
Thales Air Systems, Melbourne
Australia.
andrew.tagg@thalesatm.com
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.