• 3 replies
  • Latest Post - ‏2013-07-12T14:53:15Z by ChrisAnnal
19 Posts

Pinned topic Simple For Script

‏2013-07-08T15:45:24Z | attribute delete

I just want to delete all entries in a column for a given attribute.  So I wrote this:

for <attribute> in current do

And tried these:

1)     string delete(Module, AttrDef <attribute>)

2)     <attribute> = modify(<attribute>, setDefault, void)

Unfortunately, I'm somewhat new to DXL and can't seem to troubleshoot the faults or use the DXL help very well.  Additionally, I'd like to be able to highlight a group within a column and delete them, but that may be overly complicated.


  • GregM_dxler
    166 Posts

    Re: Simple For Script


    Might be worthwhile to get a class in dxl.

    To delete all entries for an attribute "_CR number" you can try the following script:

    Object o

    string attr = "_CR number"

    for o in current Module do {

       o.attr = null


    Hope this helps,


  • Tony_Goodman
    271 Posts

    Re: Simple For Script


    I am curious to know why you are attempting to do this using DXL.

    This sort of operation is best done using the user interface.

  • ChrisAnnal
    64 Posts

    Re: Simple For Script


    As Tony suggested, the best approach may be to simply use the built-in tools of DOORS, rather than writing a script in this case.

    • Right-click on an object
    • Select "Properties"
    • In the Properties dialog, select the "Attributes" tab
    • For the selected Attribute, use the "View/Edit" button to make the necessary change. In this case, you could use to select the default, which should remove any existing choice
    • Use the additional radio buttons for applying the change to just the Current object, Selected objects, or Objects in current view

    You can use this method to make changes to a large number of objects at once. I hope this helps.