Click or drag to resize

PartServicesCreatePart Method

Creates new part definition. This may be an internal part definition, a customer part, and manufacturer part, or a vendor part. The kind of part to be created is determined by the object type of the newPart parameter. The method will fail if the specified part already exists in the system (A AlreadyExistsException will be thrown.

Namespace:  FactoryLogix.xTend.PartDefinition
Assembly:  FactoryLogix.xTend.API (in FactoryLogix.xTend.API.dll) Version: 8.242.0.0 (8.242.0.0)
Syntax
public PartBase CreatePart(
	Guid sessionId,
	PartBase newPart
)

Parameters

sessionId
Type: SystemGuid
The session identifier that was returned by the Connect(String, String, String, String, String) method.
newPart
Type: FactoryLogix.xTend.DataObjectsPartBase
An object representing the new part to be created which is of type InternalPart, CustomerPart, ManufacturerPart, or VendorPart. The Id property of the object need not be valid. The PartNumber property of the object must be specified. For assembly type internal parts, the Revision property is also mandatory. For customer, vendor, and manufacturer parts, the Name property of the "related item" (Customer, Vendor, or Manufacturer) must also be specified so that the new part is related properly to the appropriate related item.

Return Value

Type: PartBase
An object derived from type PartBase representing the newly created part, with a valid Id property.
Exceptions
ExceptionCondition
InvalidSessionExceptionThrown if the sessionId parameter is invalid.
AlreadyExistsExceptionThrown if part specified by the newPart parameter already exists in the system.
CustomerDoesNotExistsExceptionThe customer defined for the customer part does not exist in the system.
ManufacturerDoesNotExistsExceptionThe customer defined for the manufacturer part does not exist in the system.
VendorDoesNotExistsExceptionThe customer defined for the vendor part does not exist in the system.
NotAuthorizedExceptionThrown when not authorized to perform the function.
See Also