DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Portal Group Collapsing

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

0 Kudos
Message 11 of 19
(1,565 Views)

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

0 Kudos
Message 12 of 19
(1,561 Views)

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

0 Kudos
Message 13 of 19
(1,541 Views)

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

0 Kudos
Message 14 of 19
(1,517 Views)

Hi Brad,

 

thank you for the update!

 

Martin Liese

0 Kudos
Message 15 of 19
(1,511 Views)

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

0 Kudos
Message 16 of 19
(1,013 Views)

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

0 Kudos
Message 17 of 19
(1,004 Views)

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

0 Kudos
Message 18 of 19
(1,002 Views)

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

0 Kudos
Message 19 of 19
(991 Views)