Classes
Windchill ESI services provides two classes that support Alternate Item Groups. The classes are not intended to be extended by customizers, but they may be used by customizers. These are the classes:
Alternate Item Group Support in ERP Connector
AlternateItemGroup
AlternateItemGroup is a subclass of ObjectToObjectLink and is therefore a persistable object. An AlternateItemGroup object links a WTPart (the BOM assembly part) to a WTPartMaster (the BOM component). The AlternateItemGroup object is created when a BOM is published. The object is not available to Windchill GUI clients. It has these attributes with public getters and setters:
Number
The unique alternate item group number. This is stored as an integer, but rendered as a two- byte string. The string is the base-36 value of the number.
lineNumber
The line number of the usage link that this AlternateItemGroup object describes. If line numbers are not supported, the value of this attribute is –1.
AlternateItemGroupMgr
The AlternateItemGroupMgr class provides several useful utility methods for handling AlternateItemGroup objects. These are the available methods of the class:
createAlternateItemGroup(assembly : WTPart, partUsageInfo : PartUsageInfo) : AlternateItemGroup
Creates an AlternateItemGroup object in database based upon the given PartUsageInfo object.
getAlternateItemGroups(assembly : WTPart) : Collection
Returns a collection of the AlternateItemGroup objects that are associated to an assembly part.
getAlternateItemGroup(assembly : WTPart, partUsageInfo : PartUsageInfo) : AlternateItemGroup
Returns an alternate item group, based on the assembly part iteration and the part master that are passed in. If a line number is passed in, this is used as well in the query that fetches the alternate item group.
hasSubstitutes(assembly : WTPart, partUsageInfo : PartUsageInfo) : boolean
Checks whether substitutes exist on a part usage link that exists between the passed assembly and the part master represented by the passed PartUsageInfo object.
getAlternateItemGroup(assembly : WTPart, component : WTPartMaster, lineNumber : LineNumber )
Returns an alternate item group , if there is a line number , based upon an assembly part and line number; otherwise, considering as consolidated usage links, this means that only one association exists between an assembly and more than one of the same components.
getAIGNumber(aig : AlternateItemGroup )
Returns an AlternateItemGroup id.
Was this helpful?