BUG: develop plugin for dw7.0 & 7.1


Posted on 17.01.2014 14:43
These codes developped by C++ Builder 2010, It's trying to edit the channel name, unit, scale and offset.Code 1 and 2 works well. But, something  wrong with code 3 and 4.The channel name cannot show the full string For example, if  text of  Edit5 is "Edit5", then the channel name can only show as "Ed".The channel unit will show no change , still the same as  before. But, very strangely, int the list view of all channels, the physical values column, will show part of the new unit  string. For example,  if  text of  Edit4 is "MPa",  then it will show "M".

It should be bugs.

1    curChannel->set_Scale(Edit2->Text.ToDouble());
2    curChannel->set_Offset(Edit3->Text.ToDouble());
3    curChannel->Unit_=Edit4->Text.c_str();
4    curChannel->Name =Edit5->Text.c_str();
Marjan Grilj

Posted on 20.01.2014 08:35
Suggested is to check that strings passed to unit and name properties are in UTF16 format.

Posted on 21.01.2014 14:58

thanks for the anser.

the problem is fixed partially using the following codes. Channel name can be modified correctly.

But the unit property still have the problem. Shown as the picture.

In the all channels list view, the unit seems to be changed as red circle marked in figure 1.

But once the channel property window opened as shown in figure 2, the unit seems to be not changed marked as red circle.

Possible be a bug?

curChannel->Unit_ = System::WideString(Edit4->Text.c_str()).c_bstr();

curChannel->Name = System::WideString(Edit5->Text.c_str()).c_bstr();

Marjan Grilj

Posted on 30.01.2014 12:34

Fix is included in X1/7.1.1 build 252.

Login to reply to this topic. If you don't have account yet, you can signup for free account .
This website uses cookies to ensure you get the best experience on our website. Learn more