RobotStudio event

Trouble with abb namespaces

Options
Roman_Pleshakov
edited January 2018 in Developer Tools
Hello, I have a conflict with abb namespaces and windows standart namespaces in my custom flexpendant app.
I need to draw figure using a special method (for example: g.DrawRectangle(new Pen(Color.Black), x1 + X_offset, y1 + Y_offset, b, h)). 
It works right with the int type of variables. However, when I use float type I get the following error:

Error  1  The best overloaded method match for 'System.Drawing.Graphics.DrawRectangle(System.Drawing.Pen, int, int, int, int)' 
Error  2  Argument '2': cannot convert from 'float' to 'int'

Everything works fine if I create a project in standart WindowsFormApplication.
I think this is due to the conflict of namespaces, which I declare on the top.

using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Drawing.Imaging;
using System.Windows.Forms;

using ABB.Robotics.Controllers;
using ABB.Robotics.Tps.Taf;
using ABB.Robotics.Tps.Windows.Forms;
using ABB.Robotics.Tps.Drawing;
using ABB.Robotics.Controllers.FileSystemDomain;

Please, help me.

Answers

  • Hi,
    It has nothing to do with namespaces. The overload that uses floats is simply not supported on .Net Compact Framework.

    Johannes
    Johannes Weiman
    Software Engineer
    RobotStudio Team, ABB Robotics
  • JWeiman said:
    It has nothing to do with namespaces. The overload that uses floats is simply not supported on .Net Compact Framework.
    Sad news :/ Thanks!