What's new

Session Class Diagram Cheat Sheet

IADPartSession and IADAssemblySession inherit directly from both IADDesignSession and IADSession, not just transitively? Does that make any difference from the API user's point of view?
 

stepalibre

Alibre Super User
Inheritance adds functionality or combines what's in IADDesignSession and IADSession into IADPartSession.
 

stepalibre

Alibre Super User
Does that make any difference from the API user's point of view?
It does when you're writing code, understanding where methods are and what are the difference between interfaces. There's not a lot of functionality in IADAssemblySession compared to IADPartSession. IADGlobalParameterSession only has two properties and inherits only IADSession.
 

stepalibre

Alibre Super User
Sometimes I forget where a property is. In the Design or the Part and view this Cheat Sheet. I have static classes that wrap a lot of common code, but I review class diagrams, after long periods away from Alibre API projects.
 
Inheritance adds functionality or combines what's in IADDesignSession and IADSession into IADPartSession.

Everything in IADSession is already inherited by IADPartSession via IADDesignSession. So I don't think it make a difference for IADPartSession to also inherit directly from IADSession. Or does it?

C# and VB don't even support multiple inheritance, so how is this possible in the .Net API?
 

stepalibre

Alibre Super User
These are interfaces not class:
Code:
Public Interface IADPartSession
    Inherits IADSession , IADDesignSession
End Interface
Public Interface IADSession
End Interface
Public Interface IADDesignSession
End Interface
C#:
public interface IADPartSession : IADSession, IADDesignSession
{
}
public interface IADSession
{
}
public interface IADDesignSession
{
}
 
Top