Hello,
I have few questions,
1. How to change the "type" of custom attribute once we created? If not possible, then how to move the data from old attribute to new?
2. what is the difference between object and module attribute scope? how to use it?
Any help is appreciated!!
Regards,
Muthurani M
muthurani - Mon Sep 20 11:11:42 EDT 2010 |
|
Re: Attribute definition SystemAdmin - Mon Sep 20 12:03:55 EDT 2010
Hi,
I know about your second question.
Requirements in DOORS are Objects and these Objects are grouped in Modules.
Objects = Requirements (each individual requirement).
Modules = Set of Objects.
I hope I helped.
|
|
Re: Attribute definition muthurani - Tue Sep 21 04:35:50 EDT 2010 SystemAdmin - Mon Sep 20 12:03:55 EDT 2010
Hi,
I know about your second question.
Requirements in DOORS are Objects and these Objects are grouped in Modules.
Objects = Requirements (each individual requirement).
Modules = Set of Objects.
I hope I helped.
Hi,
Thanks for your valuable information.
I knew the meaning in theoretical. But i want to know practical like if we create one attribute with object scope and another one with module scope. then how to differentiate in module level.
Thanks in advance,
Muthurani M
|
|
Re: Attribute definition Craig_Cordrey - Tue Sep 21 05:14:37 EDT 2010
1. It depends what you mean by "change the 'type'". If you mean changing the base data type of an attribute, like changing a Text to a String or a Real to an Integer, then you cannot do this once the attribute has been created. You will need to create a new attribute of the required type and then copy the values across, either by hand or by writing a DXL script.
If you mean modifying the definition of a 'type', especially an enumeration type, then you can add, delete and modify enumeration values or min/max values after the type has been defined.
If you mean changing some of the settings of an attribute, such as having a default or not, or multi-valued/single-valued, then again you can do this at any time.
2. Attributes are only visible in their associated properties dialog. So, object attributes are only visible in the Object Properties dialog, and module attributes are only visible in the Module Properties dialog. Use Object Properties when the values of the property may change for each object in a module. Use Module Properties when the value of the property applies to the module as a whole, and does not change with each object.
|
|
Re: Attribute definition muthurani - Tue Sep 21 05:43:52 EDT 2010 Craig_Cordrey - Tue Sep 21 05:14:37 EDT 2010
1. It depends what you mean by "change the 'type'". If you mean changing the base data type of an attribute, like changing a Text to a String or a Real to an Integer, then you cannot do this once the attribute has been created. You will need to create a new attribute of the required type and then copy the values across, either by hand or by writing a DXL script.
If you mean modifying the definition of a 'type', especially an enumeration type, then you can add, delete and modify enumeration values or min/max values after the type has been defined.
If you mean changing some of the settings of an attribute, such as having a default or not, or multi-valued/single-valued, then again you can do this at any time.
2. Attributes are only visible in their associated properties dialog. So, object attributes are only visible in the Object Properties dialog, and module attributes are only visible in the Module Properties dialog. Use Object Properties when the values of the property may change for each object in a module. Use Module Properties when the value of the property applies to the module as a whole, and does not change with each object.
Hello,
Thanks for your valuable reply.
1. How to copy the data from one attribute to another with the use of DXL coding as i created new attribute with different type. And am having many objects..so doing manually is very difficult for me. If possible help me to do with DXL coding.
2. Module attributes are only visible in the Module Properties dialog.Cannot we add the module attributes in view?
Thanks in advance,
Muthurani M
|
|
Re: Attribute definition Craig_Cordrey - Tue Sep 21 06:18:54 EDT 2010 muthurani - Tue Sep 21 05:43:52 EDT 2010
Hello,
Thanks for your valuable reply.
1. How to copy the data from one attribute to another with the use of DXL coding as i created new attribute with different type. And am having many objects..so doing manually is very difficult for me. If possible help me to do with DXL coding.
2. Module attributes are only visible in the Module Properties dialog.Cannot we add the module attributes in view?
Thanks in advance,
Muthurani M
1. I'm afraid I know very litle DXL. Perhaps someone else will be able to offer some guidance. It may help them if they have an example of the type you wish to change from and to.
2. No, you cannot see module attributes of the current module in a view. The value of the module property would be the same for every object in your view, so it doesn't really make much sense showing it against every object. If you really want to, I imagine you could write some DXL to copy a module attribute value into a Layout DXL attribute.
If you have links to another module, you can see that module's module properties in a view. It might be possible to use internal links and then the Analysis wizard to populate a column with module properties, but again I don't see the avlue in doing so.
|
|
Re: Attribute definition llandale - Tue Sep 21 10:52:06 EDT 2010
The 'module' scope means you can set the value for the module. There is already , perhaps you want to define some attribute. The 'object' scope means you can assign values to individual objects. Note that will generate an error because Prefix is a module-only attribute. You can define an attribute for both 'module' and 'object', such as .
You cannot change the 'type' of an attribute. You need to create a new attribute and do a couple of rename-attribute and copy the values over. Seems to me the sequence is this:
o Open Edit. o Rename the Old attribute to nameAttr
"Old". o Create the
new attribute with the correct Type, but with properties to not record History. o Copy the old to the
new:
for obj in entire (current Module)
do
{
if (!isDeleted(obj)) set(obj.
"Sequence", obj.
"Sequence Old")
} o Delete the
"Old" attribute o Change properties of the
new one to allow recording History. Save the module.
But WAIT! First find all views containing the old attribute. After renaming, load each view and re-insert it and save the view.
|
|