Click or drag to resize

PartServicesCreatePartRelationship Method

Establishes a new relationship between two part definitions of different kinds. The parentPart and relatedPart parameters must be compatible types, and must have valid Id properties. When creating alternate internal part relationships (internal part TO internal part), the newly created relationship will have the lowest possible precedence. To establish an alternate part number relationship with higher precedence, use the CreateAlternatePartRelationship method instead.

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 CreatePartRelationship(
	Guid sessionId,
	PartBase parentPart,
	PartBase relatedPart
)

Parameters

sessionId
Type: SystemGuid
The session identifier that was returned by the Connect(String, String, String, String, String) method.
parentPart
Type: FactoryLogix.xTend.DataObjectsPartBase
The part whose relationships will be augmented. This may be any kind of part. The Id property of the object must be valid.
relatedPart
Type: FactoryLogix.xTend.DataObjectsPartBase
The part that will be added to the parent part's relationships. The Id property of the object must be valid.
Exceptions
ExceptionCondition
InvalidSessionExceptionThrown if the sessionId parameter is invalid.
NotFoundExceptionThe specified parentPart or relatedPart was not found in the system.
RelatedItemTypeExceptionThe specified relatedPart is not relevant to the parentPart.
See Also