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: Special Attribute ?
Topic Summary:
Created On: 9-Dec-2008 18:22
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.
 9-Dec-2008 18:22
User is offline View Users Profile Print this message


Heng Jean-Philippe

Posts: 15
Joined: 21-Jul-2008

Hi everybody,

How to set an attribute value with DXL but prohibit its setting by a user in GUI?
Is there a way to do that without managing accesses on the attribute?

Thanks for answers

JP. HENG
Report this to a Moderator Report this to a Moderator
 9-Dec-2008 18:24
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

Use an attributeDXL
Report this to a Moderator Report this to a Moderator
 9-Dec-2008 18:26
User is offline View Users Profile Print this message


Heng Jean-Philippe

Posts: 15
Joined: 21-Jul-2008

Thanks ron for the quick answer.
Can you give me an example for this attribute DXL please?
Report this to a Moderator Report this to a Moderator
 9-Dec-2008 18:28
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

Look under attrDXL in help file to see attached

// impact.dxl -- example of DXL attribute
/*
DXL attribute provides a means of initializing
an attribute using DXL, so that subsequent
accesses of the attribute do not involve
re-calculation.
This example of DXL attribute requires that an
integer attribute named "Outgoing" exists and
has been defined with the DOORS GUI to use this
file as its DXL value.
"Outgoing" is set to the number of links
leaving its object.
*/
Link l
int count = 0
// obj is the predeclared object whose attribute
// we are calculating
for l in obj->"*" do count++
// count outgoing links
obj."Outgoing" = count
// initialize the cached value
// resetting to (string null)
// in a DXL program
// will force re-calculation
// end of impact.dxl
Report this to a Moderator Report this to a Moderator
 9-Dec-2008 18:32
User is offline View Users Profile Print this message


Heng Jean-Philippe

Posts: 15
Joined: 21-Jul-2008

Ok is see how to do that but how can i know if it is a DXL script or a user in GUID that are trying to set the value?
Report this to a Moderator Report this to a Moderator
 10-Dec-2008 08:37
User is offline View Users Profile Print this message


Peter Albert

Posts: 232
Joined: 30-Dec-2005

You can not modify the value of an attributeDXL variable via the GUI. You can, however, modify the value using DXL, but the value will not persist, as it will be re-calculated at the next possibility, e.g when the module is re-opened again.

Peter
Report this to a Moderator Report this to a Moderator
 10-Dec-2008 12:14
User is offline View Users Profile Print this message


Marcel van der Laan

Posts: 15
Joined: 21-Sep-2007

You can use a Trigger mechanism that will not allow changes to attributes to be saved (under the condition that the attribute meets certain conditions, such as its name or type, or whatever).

The DXL code that will modify the value will need to disable the trigger, change the attribute and re-enable the trigger.

I've done this in the past with success to be able to lock certain attributes of an object if that object was linked to a certain module.

This is just a general direction you may want to follow...

Regards,
Marcel

Edit: See also the following thread: https://forum.telelogic.com/customer/doors//messageview.cfm?catid=17&threadid=8737

Edited: 10-Dec-2008 at 12:21 by Marcel van der Laan
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 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 1 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.