01-12-2010 10:48 AM
Hi Martin,
I dunno, it still works on my DIAdem 11.1.0f3806. I tried deleting the Data Portal first to see if it threw an error on an empty Data Portal, but it didn't. Were you running a VBScript in the SCRIPT editor with JUST that ONE line of code?
Brad Turpin
DIAdem Product Support Engineer
National Instruments
01-12-2010 03:04 PM
Hi Brad,
thank you for your quick response! It seems that the primary problem is not the line of code itself. It seems that's the script debugger causes the malfunction. If running the code as a single line script as you suggested everything works well. Ok the property tab of the root note was not collapsed, but nothing is perfect. Doing right the same but starting the script by clicking "script debuggen" immediately lead to the error message. This maybe makes debugging a hard job. What to do to get rid of this problem?
Martin
01-13-2010 10:53 AM
Hi Martin,
That IS interesting. I am able to reproduce your error when I run with debugging. I have no idea why that happens, but I will check with R&D and see what they say.
Stay tuned...
Brad Turpin
DIAdem Product Support Engineer
National Instruments
01-15-2010 01:18 PM
Hi Martin,
DIAdem R&D was able to reproduce this error and fix it in the DIAdem source code due to release Summer 2010.
Thanks for your feedback,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
01-15-2010 03:28 PM
Hi Brad,
thank you for the update!
Martin Liese
12-07-2012 10:21 AM
HI Brad,
Here is a weird update to this issue...
When I run my renumber code (which is just one line "Call ChnRenumber()") all of the groups in my data portal become expanded. If I try to change my code to have two lines:
Call ChnRenumber()
Call Portal.Structure.Collapse(Data.Root)
The data portal maintains all groups expanded (i.e. it does not collapse the groups). But if I subsequently run the collapse line, it does collapse the code...
Why do you think this happens?
That was the first weird thing...the second weird thing is that if I make a one line code containing
Call Portal.Structure.Collapse(Data.Root)
I can assign it to one of my function key short cuts (Say, for example, Shift+F1). By clicking the ICON, the code runs fine...but if I try the shortcut key (actually using the keystrokes shift+F1) it doesnt run...weird because my Shift+Function key shortcuts work with other codes (including my one line channel renumber code).
Any ideas as to why?
Thanks!
Jason
12-07-2012 02:09 PM
Hi Jason,
to open a new thread for your question is highly suggested, the thread you replied to is nearly two years old. And it would be nice to know your Diadem Version and maybe your Operation System. And it maybe also a good idea to upload your "renumber" code. So anyone who likes can try the same thing you did.
Best Regards
Martin Liese
12-07-2012 02:12 PM
Ok. I am running Windows 7 Professional, and Diadem 11.3.0f4563
My "Renumber" code is simply one line:
Call ChnRenumber()
I hope this helps.
I know the thread is old but it definitely pertains to the discussion so I am hopeful to hear from Brad or maybe Otmar here...
Thanks,
Jason
12-13-2012 05:54 PM
Hi Jason,
I suspect that R&D just made the Group expansion an automatic result of the ChnRenumber command-- I'm not sure why, but the Groups do expand automatically when you load data into the Data Portal.
Have you tried adding a Portal.Refresh command after the collapse? It could be that the icon click causes an automatic refresh while the shift Fkey doesn't.
Finally, I've run into situations like this before, and sometimes I can only get the result I want if I bracket the code I want with the old UIAutoRefresh variable assignment, like this:
Call DataFileLoad(FilePath, "DataPluginName") Call UIAutoRefreshSet(1) Call Portal.Structure.Collapse(Data.Root) Call UIAutoRefreshSet(0)
Brad Turpin
DIAdem Product Support Engineer
National Instruments