Space Allocation Functions

The SpaceAllocationFunctions package contains a set of functions for exposure and usage in knowledge tools.

This page discusses:

GetSpaceClone

You can use this function to get space clone from a given space reference.

Signature

SpaceReference.GetSpaceClone() : Feature

Arguments

Name Input / Output Required? Type Comment
SpaceReference In Yes ProductOccurrence The occurrence of the space reference that contains a space clone.

ReturnType

Feature

The space clone contained in the given space reference.

Example

/*
Input Argument:
SpaceOcc (ProductOccurrence)
*/
let result (Feature)

result = SpaceOcc.GetSpaceClone()
if (result <> NULL)
{
  Message (“Space Clone Name: ”, result.Name())
}

AssignVolume

You can use this function to assign a volume to a space reference.

You can work with space references as both 3D part and product reference manually for:

  • Assign volume contextual command
  • Assign volume EKL method
  • Assign volume CAA method

The creation behaviors of the above modification functions are as follows:

Space Reference as a 3D Part

  • 3D part always has its own 3D shape.

Space Reference as Product Reference

  • If there is no space representation under the space reference, it creates a space representation under it.

Signature

SpaceReference.AssignVolume(VolumeGeometry : Feature, SourceOccurrence : ProductOccurrence) : Boolean

Arguments

Name Input / Output Required? Type Comment
SpaceReference In Yes ProductOccurrence The occurrence of the space reference to which a 3D volume is assigned.
VolumeGeometry In Yes Feature The 3D volume geometry feature to be assigned to the space reference.
SourceOccurrence In Yes ProductOccurrence The product occurrence that contains the 3D volume feature.

ReturnType

Boolean

TRUE if the 3D volume is assigned to the space reference successfully, FALSE if not.

Example

/*
Input Argument:
SpaceOcc (ProductOccurrence)
VolumeGeometry (Feature)
SourceOcc (ProductOccurrence)
*/
let result (boolean)

result = SpaceOcc.AssignVolume(VolumeGeometry, SourceOcc)
if (result)
{
  Message (“The 3D volume is assigned to the space reference successfully.”)
}

GetSourceOfSpaceClone

You can use this function to map space cells to space references.

Signature

SpaceReference -> GetSourceOfSpaceClone (IsSystemGenerated : Boolean) : Feature

Arguments

Name Input / Output Required? Type Comment
SpaceReference In Yes SPP_SpaceRef The space reference, which contains a space clone.
IsSystemGenerated Out No Boolean

TRUE: SpaceReference is generated from space system.

FALSE: SpaceClone is created by assigning volume.

SSM_Generated extension on space reference is referred.

Return Type

Feature

Returns the source feature of SpaceClone from the given space reference. If SpaceClone comes from SpaceCell, it means that the input space reference is generated from a space system. Then, the SpaceCell feature is returned. Otherwise, the space reference is an intermediate node of the space hierarchy. If the space reference is created by assigning volume, the source feature of SpaceClone is returned.

Example

/*
Input Argument:
SpaceRef(SPP_SpaceRef)
*/
let result (Feature)
let IsSystemGenerated(Boolean)

result = SpaceRef.GetSourceOfSpaceClone(IsSystemGenerated)
if (result <> NULL)
{
  Message("Source feature name : #, SystemGenerated : #", result.Name(), IsSystemGenerated)
}