REDINS   

Equivalent PK functions: PK_INSTANCE_change_part

REDINS ( instnc, part, ifail )
==============================

  Redirect instance.

Receives:
  KI_tag_instance          *instnc         --- instance to redirect
  KI_tag_part              *part           --- part it should instance

Returns:
  KI_cod_error             *ifail          --- failure indicator

Specific errors:
  KI_anon_sub_part          instance of anonymous sub-part of stored part
  KI_cyclic_assy            instance would cause cyclic reference
  KI_not_in_same_partition  Instnc and part are in different partitions

Description:
  REDINS redirects 'instnc' so that it instances a different part. It is
  equivalent to creating a new instance of 'part', with the same transform (i.e.
  with the same tag) and attributes attached, and then deleting the 'instnc'.

  If the redirected instance would cause the assembly graph to become cyclic
  (i.e. when redirecting an instance in A to P, and P or a sub-part of P is A)
  KI_cyclic_assy will be returned in 'ifail'.

  We define the true-sub-parts of a stored (ENSTST) part S as those anonymous
  (ENSTAN) sub-parts of S reachable from S without encountering other stored
  parts.

  If P is anonymous and is a true-sub-part of some stored part S then P may only
  be instanced from S or a true-sub-part of S. If this condition is not met
  KI_anon_sub_part is returned in 'ifail'.