Public Member Functions | List of all members
PartGroup Class Reference

PartGroup class is used to specify a part group.
The class can be called from GroupList class.
. More...

Public Member Functions

double Area ()
 Returns the area for a PartGroup in 2D model. More...
 
String GetName ()
 Returns the name of part group. More...
 
PartGetPart (Variant &var)
 Returns a Part object by specifying part ID or name. More...
 
PartGetPartByIndex (int index)
 Returns a Part object by specifying the index. More...
 
Variant GetPartIDs ()
 Returns the part ID list. More...
 
bool IsValid ()
 Returns True if an object is valid. More...
 
int NumParts ()
 Returns number of parts. More...
 
double Volume ()
 Returns the volume for a part group in 3D model. More...
 

Detailed Description

PartGroup class is used to specify a part group.
The class can be called from GroupList class.
.

Example of obtaining the class object:

app.GetModel(0).GetGroupList().GetGroup(0)

Member Function Documentation

double PartGroup::Area ( )

Returns the area for a PartGroup in 2D model.

Returns
Area of part group

Return 0 for 3D model.

String PartGroup::GetName ( )

Returns the name of part group.

Returns
Name of the part group
Part * PartGroup::GetPart ( Variant &  var)

Returns a Part object by specifying part ID or name.

Parameters
varName or ID of the part
Returns
Part object
Part * PartGroup::GetPartByIndex ( int  index)

Returns a Part object by specifying the index.

Parameters
indexIndex of the part
Returns
Part object
Variant PartGroup::GetPartIDs ( )

Returns the part ID list.

Returns
ID list
bool PartGroup::IsValid ( )

Returns True if an object is valid.

Returns
Whether or not the PartGroup objects in the list are valid
int PartGroup::NumParts ( )

Returns number of parts.

Returns
Number of parts
double PartGroup::Volume ( )

Returns the volume for a part group in 3D model.

Returns
Volume of part group
  • Returns 0 as value for 2D model.
  • The unit of volume that can be obtained with this command is the unit of length applied to the model.
    For example, the unit of volume obtained from the "Volume" script command is 'mm^3.' This occurs when the unit of length is defined as 'mm' and the unit of volume is defined as 'm^3'.