![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Layout DXL to calculate totals Topic Summary: Tracking Man Hours Created On: 15-Mar-2006 17:10 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: I played around and got that simple calculation in the DOORS module with a layout DXL column and converted it to a DXL Attribute to display in the form I created, but I have to manually refresh to get the calculations..... I like the Layout DXL when using the table in DOORS, but I would like the calculated value to display in my form. Suggestions? Thanks in advance, ;.) Nols UPDATE 9/27/06 : I could not get the auto-calc value to display in my form, but the displaying of the value in the view was good enough....thanks to those who offered suggestions. | |
![]() |
|
Hello, I realize this is something I should have done in my many years of experience with DOORS, but I've never needed this before, I've always exported views to Excel and calculated the metrics needed from there.
I have some attributes set up for our engineers to enter in hours associated with a change request for Analysis, Design, Coding, Testing, Documentation and Costing and I've created a nice form for them to use whilst entering in this information. They want me to now have a field to autocalculate the total hours spent on the above activities. I was thinking that this should be a Layout DXL attribute to be included on my form but have not found a good example of this in the DOORS or DXL help. I checked my kitchen scripts and didn't find anything there. I thought I might find one here, but have not come across one as of yet. Anyone out there have something they could share or pointers for setting this up for a Layout DXL newbie? Much thanks in advance! ------------------------- Nolita C. Morgan Computer Systems Analyst NEXRAD Radar Operations Center http://www.roc.noaa.gov/ |
|
![]() |
|
![]() |
|
Write normal DXL, except that:
1. assume variable obj is set to the current obj, i.e. the line Object obj = current has already been included for you, and 2. in order to display you result, use display i.e. display("Hi World") set up to int object attributes NewCount1 and NewCount2, and try following code int i1 = obj."NewCount1" int i2 = obj."NewCount2" int itotal = i1 + i2 display itotal "" |
|
![]() |
|
![]() |
|
Layout is inherently slow since every object is recalculated every time you display it, such as when scrolling. If the layout follows links and gets information, then scrolling a module can litterally take minutes PER SCROLL. Attribute DXL is superior in that its only recalculated when you open the module, explicitely demand a recalculation, some other time I don't recall. And also when the result is null. The main disadvantage of Attribute DXL is that you have to create an attribute in the module.
Your calculation seems to be a natural for Attribute DXL. Attached find a snippette of code that can make it work. - Louie |
|
![]() |
|
![]() |
|
Do I understand correctly then ?....
with Attribute DXL, when scrolling, if the result is null then the calculation for that object is redone. BUT in all alther case the re-calcualtion is dependant on time, or when explicitly requested. Pete |
|
![]() |
|
![]() |
|
Do I understand correctly then ?....
with Attribute DXL, when scrolling, if the result is null then the calculation for that object is redone. BUT in all alther case the re-calcualtion is dependant on time, or when explicitly requested. Pete |
|
![]() |
|
![]() |
|
If the AttrDXL does something simple like divide the values of two other attributes, then any "recalculation" issues are mute since its already so fast. Recalculation matters most when links are involved, such as if you wish to display the Object IDs of all linked partner objects.
Section "DXL Attribute" in chapter "Attributes" of the DXL manual says AttrDXL is updated the first time its value is accessed, but that value is cached and displayed for subsequent accesses. Judging by these statements and imperical evidence, the value is NOT stored in the module when you close it, so when you open it again recalculation is required. "Accessing" such an attribute value certinaly includes when reference it in some other DXL script (e.g. "string AttrDXLValue = obj.NameOfAttrDXL"), but its also accessed when you first display an object when that Attribute is in the current view. Thus, the first time you scroll down a module its slow since the values are being calculated, but subsequent scrolling is faster. You can force recalculation via the Tools menu, which you would want to do if you know the values should be updated. If you AttrDXL calculates to null then you should, IMO, set it instead to a blank space; otherwise you will trigger constant recalculation. You can write a single DXL that can be used as a Layout or as AttrDXL as demonstrated in the attached DXL. I'd make that a library function. - Louie |
|
![]() |
|
![]() |
|
I played around and got that simple calculation in the DOORS module with a layout DXL column and converted it to a DXL Attribute to display in the form I created, but I have to manually refresh to get the calculations..... I like the Layout DXL when using the table in DOORS, but I would like the calculated value to display in my form. Suggestions?
Thanks in advance, ;.) Nols UPDATE 9/27/06 : I could not get the auto-calc value to display in my form, but the displaying of the value in the view was good enough....thanks to those who offered suggestions. ------------------------- Nolita C. Morgan Computer Systems Analyst NEXRAD Radar Operations Center http://www.roc.noaa.gov/ Edited: 27-Sep-2006 at 17:25 by Nolita Morgan |
|
![]() |
|
![]() |
|
It would be unusual, but I see no reason that a 'layout' cannot, in addition to 'display'ing a value, also set some attribute value. That is, it looks something like this:
Value = use 'obj' to calculate some value ValueAttr = obj.NameTargetAttr if (Value != ValueAttr) obj.NameTargetAttr = Value // [1] Update the attribute display(Value) // [2] Display the Value in the column Be SURE that the Target attribute does NOT record History, or in fact affect change bars nor affect change dates. The only advantage I see of this is that the Attribute updates rediculously often, and not just when you open the module. - Louie |
|
![]() |
|
![]() |
|
Yes, AttrDXL is updated each time the object is displayed (like LayoutDXL) if the value is null. AttrDXL is updated when you open the module (or is it the first time the value is accessed after opening the module...) and when you request it via the Tools menu. There may be some other time also.
To prevent rediculous recalculation of AttrDXL you should set the result to a space if it is other wise null: if (null Results) Results = " " obj.attrDxlName = Results - Louie |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Layout DXL to calculate totals
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.