10-13-2016 03:07 PM
Hello All
I'm a big DIAdem fan and evangelize for it every chance I get. One of my users encountered a problem the other day that involves unit conversion. I have not been able to fix the problem but it's easy to reproduce. I have a channel that records temperature in degrees F and I want to change it to Celsius. In data portal I click on the unit property and change it from F to C. But now the text that was previously in the description property, for instance "Reactor Core Temperature", is replaced with group number and channel name. For example: Input: [4]/Temperature_1 (16). This causes a lot of trouble because we use scripts that extract the descriptions to use as text in reports. Why does DIAdem do this and can I turn it off?
Dave
Solved! Go to Solution.
10-14-2016 12:25 AM
Hello Dave,
Great to hear that you enjoy DIAdem.-
This is an optional behavior. Depending on what you are doing in DIAdem this is documented in the property "description". If you go to the DIAdem settings you can switch this off.
Greetings
Walter
10-14-2016 02:57 AM
If you press Ctrl+Shift+c in the dialog shown by Walter you alse get the script parameter to be used to switch it off.
ChnCommentOver = 0
you can integrate it into your scripts.
To avoid changing global state you can use an auto class that will set back if script is finished.
' create an instance of the auto class at the start of your script ' or in the scope where you want to change the behavior dim accoo : set accoo = new AutoChnCommentOverOff ' .... class AutoChnCommentOverOff Private Sub Class_Initialize() oldState_ = ChnCommentOver ChnCommentOver = 0 End Sub Private Sub Class_Terminate() ChnCommentOver = oldState_ End Sub private oldState_ end class
10-14-2016 07:10 AM
That did the trick. Thank you so much! My users will be happy that they don't have to replace the comments when they convert units.
10-14-2016 07:19 AM
I haven't tried the script yet but since the script generator created the statement "ChnCommentOver = 0" it is likely to work. I have to ask though, what was the purpose for overwriting the comments? Why not create a new property and put the information there, avoiding the loss of information? Anyway the solutions work and everyone is happy again.
Thank you,
Dave
10-19-2016 10:05 AM - edited 10-19-2016 10:06 AM
Hi Dave,
I share your frustration that property overwriting occurs at all. The reason is that before DIAdem 9.0 there were only a static number of properties, as defined by the DIAdem DAT file format. It was not an option to create new properties, so the only choice was whether to clobber an existing property value with information about the action that edited that channel (usually the ANALYSIS function name). R&D decided at the time that traceability was more important than the information loss.
So the obvious follow-up question is why not change things now that we can create any properties we want? That may happen, but one voice against it is that for decades customers have gotten used to this behaviour, and some of them may be relying on it. Feel free to vote for a change in the DIAdem Idea Exchange forum. The more customers who ask for change, the more likely it is that it'll happen.
https://forums.ni.com/t5/DIAdem-Idea-Exchange/idb-p/diademideas
Brad Turpin
DIAdem Product Support Engineer
National Instruments