/** // (not in Menu) Create a view that contains a column for each attribute that is filled, except for internal and WEXP Attributes * Created by: MSC - IT-QBase GmbH * Creation date: 23.02.2010 * * DXL Editor is provided by SODIUS (www.dxleditor.com) */ bool isViewAvailable(Module mod, string viewName) { string s; bool b = false for s in views(mod) do { if( s==viewName ) { return true } } return false; } void createView( Module mod, string viewName, Skip attrNames) { Column c int n = 0 // number of existing columns int i = 0; // column index for c in mod do n++ // count the columns if( n>0 ) { for i in 1:n do delete(column 0) // delete n column 0s } string attName i = 0; for attName in attrNames do { if( exists( attribute(attName)) ) { insert(column i) attribute(column i, attName) width(column i, 100) //justify(column i, center) i++; } } save view viewName } Skip skpIgnoreAttr = createString put (skpIgnoreAttr, "Absolute Number", "") put (skpIgnoreAttr, "Created By", "") put (skpIgnoreAttr, "Created On", "") put (skpIgnoreAttr, "Created Thru", "") put (skpIgnoreAttr, "Created By", "") put (skpIgnoreAttr, "Last Modified By", "") put (skpIgnoreAttr, "Last Modified On", "") put (skpIgnoreAttr, "Object Heading", "") put (skpIgnoreAttr, "Object Text", "") put (skpIgnoreAttr, "Picture", "") put (skpIgnoreAttr, "PictureName", "") put (skpIgnoreAttr, "PictureNum", "") put (skpIgnoreAttr, "Paragraph Style", "") put (skpIgnoreAttr, "TableBottomBorder", "") put (skpIgnoreAttr, "TableCellWidth", "") put (skpIgnoreAttr, "TableCellAlign", "") put (skpIgnoreAttr, "TableChangeBars", "") put (skpIgnoreAttr, "TableLeftBorder", "") put (skpIgnoreAttr, "TableLinkIndicators", "") put (skpIgnoreAttr, "TableRightBorder", "") put (skpIgnoreAttr, "TableShowAttrs", "") put (skpIgnoreAttr, "TableShowWide", "") put (skpIgnoreAttr, "TableTopBorder", "") put (skpIgnoreAttr, "TableType", "") Regexp regIgnore = regexp "WEXP*|DOC*" Module modCur = current if (null modCur) { ack "Open a module first" halt } string strFilledView = "Filled Attributes" if (isViewAvailable (modCur, strFilledView)) { //ack "The view '" strFilledView "' exists. Delete it before starting this script" //halt Item itmModule = item(fullName(modCur)); View vFilled = view(itmModule, strFilledView) delete (vFilled) } if (!confirm "This script is used for and by the support team. This script will do something. Is this OK for you?") { halt } Skip skpIncludeAttrs = createString AttrDef adCurrent for adCurrent in modCur do { if (adCurrent.object) { string strAdName = adCurrent.name if (!find (skpIgnoreAttr, strAdName) && !regIgnore strAdName) { Object objCur for objCur in entire modCur do { //print objCur.strAdName "" if (hasSpecificValue( objCur, adCurrent) && "" != objCur.strAdName "") { put (skpIncludeAttrs, strAdName, strAdName) } } } } } createView (modCur, strFilledView, skpIncludeAttrs) r, strFille