Hello every one,
i have a question about how to handle views in doors dxl. In detail I wrote a script which iterates over views in a module and then over all columns in the current selected view. Then the script changes a property of the columns. after that I save the current view with the following comand. save(v) // v is a hande of type View and contains the current view __________________________________________________________________________
for Name in views(m) do
{
compare = findPlainText(Name,viewCode,offset,matchLenght,true);
if(compare)
{
v = view(Name);
load(m, v)
for c in m do
{
if(cnt > 1) backgroundColor(c, attributeName);
cnt++;
}
save(v);
}
}
And this is where the truble begins, for what ever reason the script is reseting some view properties in the Remember Settings. Which can be found in the "View -> Manage Views" Tab. And I dont't know why and how this can happen. I hope some one can tell me a work around for this.
Here is a Picture of the Remember settings bevor I run the script.
And here is a picture after I run the script. (To prevent missunderstandings the picture with the unchecked box "current object" is the picture before running the script)
Thank you in advance.
Kind regards Patrick Patrick_1 - Tue Apr 24 05:59:01 EDT 2018 |
Re: Accessing view properties from DXL not sure whether this helps here, but in DXL, it is never a good idea to iterate over several objects (here: views) and modify them at the same time. So, it might help if you first create a Skip List of all view names, then iterate over all items of the Skip List.
|
Re: Accessing view properties from DXL Mike.Scharnow - Tue Apr 24 07:04:03 EDT 2018 not sure whether this helps here, but in DXL, it is never a good idea to iterate over several objects (here: views) and modify them at the same time. So, it might help if you first create a Skip List of all view names, then iterate over all items of the Skip List.
Thank you for your post. I tried out your idea, to create a skip list fill it and then iterate over it, but sadly it didn't helped. the "current Object" property is checked after I executed the script as I mentioned in my opening post. |