Click or drag to resize

PartServicesCreateAlternatePartRelationship Method

Establishes a new alternate part relationship between two internal part definitions.

Namespace:  FactoryLogix.xTend.PartDefinition
Assembly:  FactoryLogix.xTend.API (in FactoryLogix.xTend.API.dll) Version: 8.242.0.0 (8.242.0.0)
Syntax
public void CreateAlternatePartRelationship(
	Guid sessionId,
	InternalPart parentPart,
	InternalPart relatedPart,
	int precedence
)

Parameters

sessionId
Type: SystemGuid
The session identifier that was returned by the Connect(String, String, String, String, String) method.
parentPart
Type: FactoryLogix.xTend.DataObjectsInternalPart
The part whose alternate relationships will be augmented. The Id property of the object must be valid.
relatedPart
Type: FactoryLogix.xTend.DataObjectsInternalPart
The part that will be added to the parent part's alternate list
precedence
Type: SystemInt32
An integer value of 1 to X indicating the substitution logic for the related part. Parts with lower precendence numbers are considered to be better substitutes for the parent part when choosing alternate parts. If the number specified conflicts with an existing alternate part relationship, all existing alternate relationships of equal or higher precedence will be moved to a lower priority (higher precedence number). If the number specified is more than one greater than the currently highest precedence alternate, the precedence assigned to the new alternate will be reduced to (previously highest) + 1.
Exceptions
ExceptionCondition
InvalidSessionExceptionThrown if the sessionId parameter is invalid.
NotFoundExceptionThe specified parentPart or relatedPart was not found in the system.
AlreadyExistsExceptionThe specified relatedPart is already an alternate for the parentPart.
See Also