SMIEngine C# ISMIPa...
 
Notifications
Clear all

SMIEngine C# ISMIPath

4 Posts
1 Users
0 Reactions
15.9 K Views
(@LCombe)
Posts: 2
New Member Guest
Topic starter
 

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

 
Posted : 14/06/2011 3:26 am
(@csearcy)
Posts: 316
Reputable Member Guest
 

Hi Lionel,

Please try the following...

SMIHostClass Host2 = new

INTEGMOTORINTERFACELib.SMIHostClass();

Host2.EndSpeed = 1000;

 
Posted : 14/06/2011 12:53 pm
(@LCombe)
Posts: 2
New Member Guest
Topic starter
 

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

 
Posted : 16/06/2011 11:08 pm
(@NathanRandallHolt)
Posts: 6
Active Member Guest
 

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.

 
Posted : 29/11/2012 2:04 pm
Share: