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.”)
}