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

TOPIC: SMIEngine C# ISMIPath

SMIEngine C# ISMIPath 6 years 11 months ago #131

  • LCombe
  • LCombe's Avatar
  • 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
The administrator has disabled public write access.

Re: SMIEngine C# ISMIPath 6 years 11 months ago #132

  • csearcy
  • csearcy's Avatar
  • OFFLINE
  • Posts: 459
  • Thank you received: 77
  • Karma: 23
Hi Lionel,

Please try the following...

SMIHostClass Host2 = new

INTEGMOTORINTERFACELib.SMIHostClass();

Host2.EndSpeed = 1000;
Last Edit: 6 years 11 months ago by csearcy.
The administrator has disabled public write access.

Re: SMIEngine C# ISMIPath 6 years 11 months ago #133

  • LCombe
  • LCombe's Avatar
  • 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
The administrator has disabled public write access.

Re: SMIEngine C# ISMIPath 5 years 5 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.
The administrator has disabled public write access.
  • Page:
  • 1
Moderators: hsummer, csearcy
Time to create page: 0.271 seconds