Hello, In the DXL script attached below, if we manually create a column 'Is a Req' in a module,and then run the script it gets populated. Instead I want the column to be created automatically when I run the script. Please assist. Thank You, kswathi2 - Mon Feb 24 04:53:53 EST 2014 |
Re: How to create a column using a script? Hello kswathi2, first of all you should become aware of the difference between a column and an attribute.
Anyhow, if you have the module open in edit mode and available as current module you can create a new attribute with the command:
So if you put this statement before the start of your loop the script should do what you want. However your script does only set the information for all object at the time it is executed. If you want the column to be always up to date and show if currently an object "Is a req" you need to use a Layout-DXL column or a DXL Attribute. (See DXL Reference "Layout DXL" and "Attribute Definitions" for more details.) - Michael |
Re: How to create a column using a script? Hello, I want to modify the above script such that when I run that script a column should be created "Is a Req" and it should verify the object text of every object for 'shall' and flag the result accordingly in 'Is a Req' column. Please assist. Thank You, |
Re: How to create a column using a script? kswathi2 - Tue Feb 25 04:43:46 EST 2014 Hello, I want to modify the above script such that when I run that script a column should be created "Is a Req" and it should verify the object text of every object for 'shall' and flag the result accordingly in 'Is a Req' column. Please assist. Thank You, At the beginning of your script, you can add a column by the commands: insert (column 1) //insert the column to the left of the second column attribute(column 1, Srcattr) //sets the column data to your attribute width(column1, 150) //specifies the width of the column so it is not skinny refresh currentModule //refresh so it gets displayed You might want to think if you want to first check to see if that attribute is already displayed in a column. Hope this helps, Greg |