01-23-2009 10:35 AM
Dear All
In the attached VI diagram the "To more specific class" gives an error messag:
LabVIEW: Type mismatch: Object cannot be type casted to the specified type.
so it can not work for my waveform chart. I think I changed some properties or some thing similar for my chart that can not work with this routine because it works for new instances of waveform charts but whatever I try to find the difference between my waveform chart and a new instance of waveform chart I don't not find any difference.
Do you have any clue?
Best regards
Afshin
01-23-2009 10:58 AM
Hi there
i don't think it is possible to cast a reference of a non - strict typedef ctl to a strict typedef ctl type.
Are you sure the ctl references are pointing to instances of the strict typedef? If not just use a "Waveform Chart" type.
01-23-2009 11:04 AM
Dear Chris
When I make a reference to my chart ("creat reference") and create a constant for that reference it gives "strict waveform chart" so I think it is a strict type and it works for new instances of chart when I add them on the panel.
Regards
Afshin
01-23-2009 11:08 AM
chrisger wrote:Hi there
i don't think it is possible to cast a reference of a non - strict typedef ctl to a strict typedef ctl type.
Are you sure the ctl references are pointing to instances of the strict typedef? If not just use a "Waveform Chart" type.
You can but it has to be the right type since things like the History node has to adapt if the chart is using DBLs Waveform data type etc.
In this example
1) Rihgt-click and make the strict ref constant into a control
2) ctrl-drag the waveform chart (the actuall chart used on the FP) into the control you created in step #1. The control will adapt the right type.
3) make the control a constant again.
Ben
01-23-2009 11:12 AM
01-23-2009 11:14 AM
Hmm, he stated that he created the class specifier constant by right clicking an instance of the original strict typedef, so the constant should match.
Am i missing something?
01-23-2009 11:16 AM - edited 01-23-2009 11:18 AM
chrisger wrote:
Hmm, he stated that he created the class specifier constant by right clicking an instance of the original strict typedef, so the constant should match.
Am i missing something?
I suspect "... I think I changed some properties or some thing similar for my chart ..." from the original post.
BTW Class names are subject to change by NI without notice. The class ID (?) is concidered safer but not totally safe.
Ben
01-25-2009 03:26 AM
Dear Ben
I think I don't get the second step. I pressed the "Cntrl" button and drag my chart icon on the Ref made in first step but nothing happens.
I tried it with both char icon and its reference but it didn't make any difference.
Best regards
Afshin