07-02-2021 12:10 PM
@felipefoz wrote:
Is there a way to know if something has really changed (programatically) and maybe discard the * ?
I have some ideas, but no convenient answers. I haven't tested any of those.
I would expect the first approach to be much easier to implement, if you can fit the change with your tooling; the second approach would be cool.
07-02-2021 12:48 PM
@Kosta escreveu:
- Consider saving the VI before running this QD, and comparing the VI before and after QD, using this post as a starting point. If VIs are different, delete the original. If VIs are the same, delete modified VI.
Great idea, that would also probably work, I might try this approach first. It should be pretty quick and I might reuse that for other comparisons too.
2. Rearchitect the QD VI by splitting analysis and coordinate computation from scripting that moves objects around and resizes windows. Only move objects and resize windows if there are any differences between original and computed coordinates or window sizes.
That would be a perfect solution, but that is going to take much more effort, right now I am thinking of not modifying the shipped plugin.
We should consider an update of this QD in the long run.
Thanks.
07-02-2021 02:15 PM
I just create a VI to collect some VI Properties used in this QD plugin. There must be a better way or I am missing some property. At least I learned a bit about the QD plugin. 😃
And the function which calls this VI is this one.
Apparently is solving my problem, but it might have some gotchas there that I am not aware of.
Thanks for the help so far.
10-01-2021 11:06 AM
@Kosta wrote:
@felipefoz wrote:
Is there a way to know if something has really changed (programatically) and maybe discard the * ?
I have some ideas, but no convenient answers. I haven't tested any of those.
- Consider saving the VI before running this QD, and comparing the VI before and after QD, using this post as a starting point. If VIs are different, delete the original. If VIs are the same, delete modified VI.
- Rearchitect the QD VI by splitting analysis and coordinate computation from scripting that moves objects around and resizes windows. Only move objects and resize windows if there are any differences between original and computed coordinates or window sizes.
I would expect the first approach to be much easier to implement, if you can fit the change with your tooling; the second approach would be cool.
I feel like something much easier than (2) but along the same lines would be to make a VI that gets an ordered list of all pertinent object coords/window sizes, wire it so it runs right before any scripting happens and right after, and compare. Fail the transaction if equal, end undo if not equal.
Thanks for the plugin by the way, it's awesome 😊
Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.
08-17-2022 12:53 PM
Hey all,
Using felipe's "Get VI Properties_LV2015.vi", I made an update to the QD plugin to fail the transaction if the QD is used on a VI and nothing changes. Tested on some basic VIs and saved in 2017. Cheers once again, this plugin has helped me so much with big cleanup jobs.
Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.
03-07-2024 12:31 PM
I noticed that sometimes the Arrange VI plugin misbehave when aligning Front Panel elements.
These elements end up overlapping each other after running the script.
I noticed that it happened mainly when the VI FP was closed, this means, running the scripting part only and not using the QD plugin.
Right now I can't reproduce the situation anymore, but I believe I have seen more than once happening.
Any clues what it could be?
Using LabVIEW 2017 SP1.
03-07-2024 12:41 PM
Felipe,
I don't know why some elements end up overlapping each other after running the script when the front panel was closed. I did not test scripting code without having front panels open. If you run into the situation again, consider, as a workaround, opening front panels using scripting before calling scripting code from this QD plugin.
03-29-2024 12:41 PM - edited 03-29-2024 02:17 PM
@Kosta escreveu:
Felipe,
I don't know why some elements end up overlapping each other after running the script when the front panel was closed. I did not test scripting code without having front panels open. If you run into the situation again, consider, as a workaround, opening front panels using scripting before calling scripting code from this QD plugin.
This workaround didn't work. I was faced again with this bug now. Unfortunately I can't share the VIs, however I am trying to create something I can share, but as of now I can share some of my findings:
My suspicious is that somehow it is keeping state somewhere between calls. I might be wrong of course. Can anyone help me with the provided information?
Using LV2017SP1 (reproduced also in LV2022Q3)
Edit: a workaround is to use call by reference. Make sure you close the reference, otherwise it will not work.