Topic
  • 1 reply
  • Latest Post - ‏2012-11-30T18:35:26Z by llandale
Bruwbruw
Bruwbruw
68 Posts

Pinned topic BaselineSet loop problem

‏2012-11-30T13:08:50Z |
Good afternoon!
I wanted a second opinion, a help to see a solution to my problem.

The problem is as it follows:
My dxl, the attached file, is a GUI with several functions, one of these functions is to add modules on a BaselineSet, created by the same GUI or not.
The thing is that if I create more than one BaselineSet, when I use the button "Add Modules" , every BaselineSet from the project receive the selected modules.
I wanted that only the latest BaselineSet received the added modules.
Or at least, that only the BaselineSet I choose receive the modules.

The thing is that I can't think of a way to call a specific BaselineSet, or just the latest BaselineSet, so it can receive the modules.

If anyone can help, thank you.

This forum helped me a lot in creating this script ...

The problem, is between lines 131 and 175

Thank you!
Updated on 2012-11-30T18:35:26Z at 2012-11-30T18:35:26Z by llandale
  • llandale
    llandale
    3035 Posts

    Re: BaselineSet loop problem

    ‏2012-11-30T18:35:26Z  
    Not following the code well. But...

    At line 151
    • for BSD in current Folder do
    you loop through all the Baseline sets. I would guess you want to compare the name of this BSD with the value you get from dbe selectModulesDB; and "continue" if they do not match. Perhaps:
    • string NameDesired = get(selectModulesDB)
    • for BSD in current Folder do
    • { if (name(BSD) != NameDesired) continue

    -Louie

    I'm pretty sure you will want to do this at the top:
    • Folder fHome = current
    and then use "fHome" instead of all those "Folder f = current" statements. If the current module changes (when you open one) so will the current folder.