Welcome, Guest
Username Password: Remember me
  • Page:
  • 1

TOPIC: SMIEngine C# ISMIPath

SMIEngine C# ISMIPath 5 years, 3 months ago #131

  • LCombe
  • OFFLINE
  • Posts: 2
  • Karma: 0
Hi All,

I'm trying to developp an application in C# but I can't create an instance of ISMIPath.

this command doesn't work:
ISMIPath myPathInterface = new ISMIPath();

How can I make an instance? How works the constructor? (if there is one...)

The VBClient sample cannot be simply converted.
' Create SMIHost object and interfaces
CommInterface = New INTEGMOTORINTERFACELib.SMIHost
PathInterface = CommInterface

Thanks for your help
Kind regards
lionel

Re: SMIEngine C# ISMIPath 5 years, 3 months ago #132

  • csearcy
  • OFFLINE
  • Posts: 480
  • Karma: 23
Hi Lionel,

Please try the following...

SMIHostClass Host2 = new

INTEGMOTORINTERFACELib.SMIHostClass();

Host2.EndSpeed = 1000;
Last Edit: 5 years, 3 months ago by csearcy.

Re: SMIEngine C# ISMIPath 5 years, 3 months ago #133

  • LCombe
  • OFFLINE
  • Posts: 2
  • Karma: 0
Hi,

My problem is not to creat a SMIHost object, my problem is to create a ISMIPath object.

I can declare a ISMIPath object but I cannot make an Instance of this object.

ISMIPath myPathInterface; // Works

myPathInterface= new ISMIPath(); // Doesn't work

Re: SMIEngine C# ISMIPath 3 years, 10 months ago #761

An SMIHost object is an ISMIPath object. You should be able to just assign an SMIHost to an ISMIPath typed variable. An interface works something like a superclass.
  • Page:
  • 1
Moderators: hsummer, csearcy
Time to create page: 0.43 seconds