What's new

V11 API Changes

sigseven

Senior Member
V11 has been released, so here are the changes to the API for V11. The API was not a focus of V11, so the changes are not particularly significant. The method/property declarations are given in C#. If you have any questions, feel free to ask.

Changes due to the transition to the .NET platform
See the post Updating your program for the V11 API for full specifications of the changes to the API that occurred due to our transition to the .NET platform in V11. It describes the changes that will be necessary for your API program to function in V11, and should be read before this post.

New interfaces

IADExternalThreadFeature
The IADExternalThreadFeature interface has been introduced to the API for V11 to allow users to query the new external cosmetic thread features which can be created in V11. At this point, the API can only query—not create or modify—this feature.

Properties
double MajorDiameter { get; }
Returns the major diameter of the external thread feature.

IADParameter MinorDiameter { get; }
Returns the IADParameter which defines the minor diameter of this external thread feature.

IADParameter ThreadLength { get; }
Returns the IADParameter which defines the thread length of this external thread feature.

bool HasEdgeChamfer { get; }
Returns true if the external thread feature is creating a chamfer on the circular edge.

string Callout { get; }
Returns a plain text string containing the callout for the external thread feature. If the callout contained one of the special Symbols it will be changed to a regular character. Use the CalloutRTF property to get the rich text string if needed.

string CalloutRTF { get; }
Returns a rich text format string containing the callout for the external thread feature.

Corresponding ADPartFeatureType
The ADPartFeatureType returned by the FeatureType property for this feature is AD_EXTERNAL_THREAD_FEATURE

Changed interfaces

IADVector
Three utility methods were added to the IADVector interface for the convenience of API developers.

New methods
bool IsEqualTo (IADVector pVector);
Returns true if this vector is equal to the given vector.

IADVector Normalize ();
Returns the normalized vector. This vector remains unchanged.

double Length { get; }
Returns the length of the vector.

IADDesignSession
The new properties added to IADDesignSession allow API users to get more information about the current display of the design.

New properties
IADPoint CameraPosition { get; }
Returns an IADPoint with the current location of the camera in this design session

int CircularFacets { get; }
Gets the current display setting for the minimal circular facets option of the design.

bool IsPerspective { get; }
Returns true if the design is in perspective view mode, rather than orthogonal.

IADSession
A new save method was introduced to match the addition of the Save All command to the UI. All of the save methods should behave the same as their UI counterparts.

New method
void SaveAll(string destination);
Saves a copy of the session and all sub-sessions to the directory indicated by the destination parameter.

Saving to the Alibre Vault
To save to vaults using the API, you will use the same methods as with the file system. Just pass a filepath with the following format: [MFiles drive letter]:\[Vault name] (ie. "M:\MyVault")

IADPartFeature
New property
IADFaces Faces { get; }
Returns all the faces that are created by this feature.

IADDraftFeature
Renamed property
IObjectCollector DraftFaces { get; }
This method was previously named just “Faces.” It is different from the Faces method of IADPartFeature in that this method returns a collection of the faces used to make the feature, whereas the IADPartFeature method returns the collection of faces that are made by the feature.

IADOffsetFaceFeature
Renamed property
IObjectCollector OffsetFaces { get; }
This method was previously named just “Faces.” It is different from the Faces method of IADPartFeature in that this method returns a collection of the faces used to make the feature, whereas the IADPartFeature method returns the collection of faces that are made by the feature.

IADExtrusionFeature
New property
double ToGeometryOffset { get; }
Returns the distance of the To Geometry Offset if it exists.

IADSweepFeature
New property
double ToGeometryOffset { get; }
Returns the distance of the To Geometry Offset if it exists.

Obsolete interfaces
A number of interfaces have now become obsolete in V11 of Alibre Design. Primarily, they are in the areas of online/team design and repositories, which have been removed in V11. Your project will still build with these interfaces and methods present in the code, but an exception will be thrown if any of them are called.

Fully obsolete interfaces
IADTeams
IADTeam
IADTeamRoles
IADTeamRole
IADUsers
IADUser
IADRepositories
IADRepository
IADFolders
IADFolder
IADFolderItems
IADFolderItem
INotificationSelector
IPermissionSelector

Interfaces with obsolete methods

IADRoot
Repositories
GetRepositoryByName
User
Teams
ListedUsers
GetUserByName
CreateTeam
GetTeamByName
SendMessage
NewPermissionSelector
NewNotificationSelector
SetAgentProperty
GetAgentProperty
RegisterAgent
RunAgent
BindReferenceToObject
 
Top