ITK Function Reference

(V10000.1.0.60_20160308.00)
Functions
Part

Functions

TCCORE_API int PART_create_part (const char *part_number, const char *part_desc, const tag_t uom_tag, const char *part_name, const char *part_type_name, const char *rev_id, const logical is_design_reqd, const int source, tag_t *part, tag_t *part_rev)
 
TCCORE_API int PART_create_part2 (const char *item_type, int num_attributes, char **attribute_names, char **attribute_values, const char *revision_id, const logical is_design_reqd, const int source, tag_t *part, tag_t *part_revision)
 
TCCORE_API int PART_rev_ask_associated_design_revs (tag_t part_rev, int *design_revs_count, tag_t **design_revs)
 
TCCORE_API int PART_rev_ask_primary_representation (tag_t part_rev, tag_t *primary_design_rev)
 
TCCORE_API int PART_rev_associate_design_rev (tag_t part_rev, tag_t design_rev, tag_t *rel_tag)
 
TCCORE_API int PART_rev_set_primary_representation (tag_t part_rev, tag_t design_rev)
 

Detailed Description

Function Documentation

TCCORE_API int PART_create_part ( const char *  part_number,
const char *  part_desc,
const tag_t  uom_tag,
const char *  part_name,
const char *  part_type_name,
const char *  rev_id,
const logical  is_design_reqd,
const int  source,
tag_t part,
tag_t part_rev 
)

Creates and saves a new part object.

Note
This itk will not save the object. AOM_save_with_extensions needs to be called separately to save the object.

The function returns:

Parameters
part_number(I) Identification number for the part. A null is allowed. If null, the system will automatically generate a part number
part_desc(I) Description for the created part. A null is allowed.
uom_tag(I) Tag of Unit of Mesaure to be assign to part (may be NULLTAG). For more see ITEM_set_unit_of_measure function
part_name(I) Common name or short description for the Part. A null is allowed.
part_type_name(I) Specifies a defined Part type
rev_id(I) Identification string (revision ID) of the Part Revision being created. A null is allowed. If null, the system will automatically generate a revision ID
is_design_reqd(I) Specifies whether a Design is required by this Part of not. This attrbiute is present on the master form of the Part
source(I) Defines the source of the Part Revision, eg. make/buy. Valid values are 0 - None, 1 - Make , 2 - Buy. This attribute is present on Part Revision Master form
part(O) Tag for identifying the Part in the current program
part_rev(O) Tag for identifying the Part Revision in the current program
TCCORE_API int PART_create_part2 ( const char *  item_type,
int  num_attributes,
char **  attribute_names,
char **  attribute_values,
const char *  revision_id,
const logical  is_design_reqd,
const int  source,
tag_t part,
tag_t part_revision 
)

This itk is a wrapper on ITEM_create_item_with_masters2. It creates a new part type item and sets the required attributes (is_designrequired and source) on the master forms with values specified by the user.

Note
This itk will not save the object. AOM_save_with_extensions needs to be called separately to save the object.

The function returns:

Parameters
item_type(I) It can be used to specify a defined Item type
num_attributes(I) Number of input attributes
attribute_names(I) Names of input attributes
attribute_values(I) Values for the input attributes
revision_id(I) Id for the revision. A null is allowed. If null, the system will automatically generate a revision ID
is_design_reqd(I) Specifies whether a Design is required by this Part of not. This attrbiute is present on the master form of the Part
source(I) Defines the source of the Part Revision, eg. make/buy. Valid values are 0 - None, 1 - Make , 2 - Buy. This attribute is present on Part Revision Master form
part(O) Tag for identifying the Part in the current program
part_revision(O) Tag for identifying the Part Revision in the current program
TCCORE_API int PART_rev_ask_associated_design_revs ( tag_t  part_rev,
int *  design_revs_count,
tag_t **  design_revs 
)

Retrieves the Design Revision objects associated to a given Part Revision object through the "TC_Is_Represented_by" relation.

The function returns:

Parameters
part_rev(I) Tag of part revision
design_revs_count(O) Number of associated Design Revision objects.
design_revs(OF) design_revs_count Array of tags of associated Design Revision objects
TCCORE_API int PART_rev_ask_primary_representation ( tag_t  part_rev,
tag_t primary_design_rev 
)

Retrieves the primary Design representation for a Part Revision object

A Part Revision may be associated with multiple Design Revision objects using the "TC_Is_Represented_by" relation. One of the associated Design Revision objects can be denoted as the primary representation.

The function returns:

Parameters
part_rev(I) Tag of Part Revision object
primary_design_rev(O) Tag of the Design Revision object which is Primary
TCCORE_API int PART_rev_associate_design_rev ( tag_t  part_rev,
tag_t  design_rev,
tag_t rel_tag 
)

Associates a Part Revision object to a Design Revision object using the "TC_Is_Represented_by" relation

The function returns:

Parameters
part_rev(I) Tag of Part Revision object
design_rev(I) Tag of Design Revision object
rel_tag(O) Tag of the relation object created
TCCORE_API int PART_rev_set_primary_representation ( tag_t  part_rev,
tag_t  design_rev 
)

Sets the primary Design representation for a Part Revision.
A Part Revision may be associated with multiple Design Revisions using the "TC_Is_Represented_by relation". One of the associated Design Revision objects can be denoted as the primary representation.

Note
The primary Design representation is used when a Part Revision is visualized in the Portal viewer.

The function returns:

Parameters
part_rev(I) Tag of Part Revision object
design_rev(I) Tag of the Design Revision object to be denoted as Primary