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.245.0.0 (8.245.0.0)
Syntax public PartBase CreatePart(
Guid sessionId,
PartBase newPart
)
Public Function CreatePart (
sessionId As Guid,
newPart As PartBase
) As PartBase
public:
virtual PartBase^ CreatePart(
Guid sessionId,
PartBase^ newPart
) sealed
abstract CreatePart :
sessionId : Guid *
newPart : PartBase -> PartBase
override CreatePart :
sessionId : Guid *
newPart : PartBase -> PartBase
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:
PartBaseAn object derived from type
PartBase representing the newly created part, with a valid Id property.
Exceptions See Also