Hi, I'm sorry if this has been answered before, but on a cursory search I did not find anything. So, currently I have a Layout DXL code that resides in Doc1, and follows links this way: Doc1 (outlink) --> (1 or more objects in) Doc2 ---> (1 or more objects in) Doc3. Then it lists all unique object IDs found in Doc3, that are somehow in-linked from Doc1. This being Layout DXL, the procedure is wasteful. For each object on display in Doc1, Do2 and Doc3 are loaded again and again and again. I would like to convert this to a standalone script if possible, that does the following:
Is there a way to do this dynamically without altering the document structure, or is going the Atttribute DXL way my only option? Thank you! chirila.alexandru - Thu May 25 08:25:00 EDT 2017 |
Re: Create column and populate via DXL Hello,
You're right, it is a big waste of time to open/close linked modules objects by objects. I am not sure of the best solution, but I think you can do it with a script plus triggers.
1- Write a DXL script with two functions: * A first function able to fill your target attribute for your entire module * Another function able to fill your attribute for one object 2- Use an open module trigger to handle your module opening Call your first function This update all your objects attributes with fresh information 3- Use an edit object trigger to handle object modifications (if you update outlinks) Call your second function This update only the modified object when you modifiy its outlinks
I can't help you more because at this time I am not really experienced with triggers. Perhaps somebody will have a better solution.
-Christophe- |
Re: Create column and populate via DXL I am a bit late to this thread, and attribute DXL and Christophe's suggestions are two possible ways forward, but they both contain the need to modify the Module itself. If you want to stick to a solution you can apply also to Modules to which you only have read access, then a third solution is possible, namely an interactive layout DXL column which interacts with a dialogue box. The advantage of this solution is that it is very fast and very flexible, the disadvantage is that you can't save it in a view. Credits for the original idea go to Mathias Mamsch (this is the link to the original post, but the URL seems to be broken now). I have attached the necessary include file. An example usage looks like this:
Basically, the dialogue box and the new column share a Skip list. The key is the Objects' Absolute Number, and the value is set by the code you can define in the routine 'interactiveLayout_calculateResults'. The actual layout DXL which is executed is limited to fetching the respective value from the Skip list, so regardless of how time consuming your actual code is, the display of its results is always fast. Cheers, Peter
Attachments interactiveLayout.inc |
Re: Create column and populate via DXL Peter_Albert - Thu Nov 23 10:27:27 EST 2017 I am a bit late to this thread, and attribute DXL and Christophe's suggestions are two possible ways forward, but they both contain the need to modify the Module itself. If you want to stick to a solution you can apply also to Modules to which you only have read access, then a third solution is possible, namely an interactive layout DXL column which interacts with a dialogue box. The advantage of this solution is that it is very fast and very flexible, the disadvantage is that you can't save it in a view. Credits for the original idea go to Mathias Mamsch (this is the link to the original post, but the URL seems to be broken now). I have attached the necessary include file. An example usage looks like this:
Basically, the dialogue box and the new column share a Skip list. The key is the Objects' Absolute Number, and the value is set by the code you can define in the routine 'interactiveLayout_calculateResults'. The actual layout DXL which is executed is limited to fetching the respective value from the Skip list, so regardless of how time consuming your actual code is, the display of its results is always fast. Cheers, Peter
current link to original post: https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014890784 |