GroupList class is used to create a group of assembly parts.
The class can be called from Model class.
.
More...
Public Member Functions | |
| void | AddPartToGroup (Variant &groupVal, Variant &val) |
| Adds a part to a group that is specified by the part name or part ID. More... | |
| void | CreateGroup (String &groupName) |
| Creates a blank group by specifying the name. More... | |
| void | CreateGroupByMaterial () |
| Groups parts with the same material. | |
| void | CreateGroupByName () |
| Groups parts with the same name. | |
| void | CreateGroupByNameStart (int characters) |
| Groups parts with the first part of their names that match the specified number of characters. More... | |
| void | CreateGroupBySelected (Selection *selection, String &groupName) |
| Groups parts selected by the Selection object by their specified name. More... | |
| PartGroup * | GetGroup (Variant &var) |
| Returns PartGroup object. More... | |
| String | GetGroupName (int groupIndex) |
| Returns the name of the group for the specified index. More... | |
| int | GetPartId (Variant &val, int partIndex) |
| Specifies a part in a group specified by its name or index by specifying the index in the group, and then returns the part ID. More... | |
| Variant | GetParts (Variant &var) |
| Returns a list of parts from a specified group by specifying its name or ID. More... | |
| bool | IsValid () |
| Returns True if an object is valid. More... | |
| int | NumGroups () |
| Returns the number of groups as an integer. More... | |
| int | NumParts (Variant &var) |
| Returns the number of parts in a group. More... | |
| void | RemoveAllGroups () |
| Removes all groups. | |
| void | RemoveGroup (Variant &var) |
| Removes a group by specifying the group name. More... | |
| void | RemovePartFromGroup (Variant &groupVal, Variant &val) |
| Removes a part from the specified group by specifying the part name or part ID. More... | |
| void | RenameGroup (Variant &var, String &newName) |
| Changes the group name by specifying a new name and the old name. More... | |
Detailed Description
GroupList class is used to create a group of assembly parts.
The class can be called from Model class.
.
Example of obtaining the class object:
Member Function Documentation
| void GroupList::AddPartToGroup | ( | Variant & | groupVal, |
| Variant & | val | ||
| ) |
Adds a part to a group that is specified by the part name or part ID.
- Parameters
-
groupVal Group name val Part name or ID
| void GroupList::CreateGroup | ( | String & | groupName | ) |
Creates a blank group by specifying the name.
- Parameters
-
groupName Group name
| void GroupList::CreateGroupByNameStart | ( | int | characters | ) |
Groups parts with the first part of their names that match the specified number of characters.
- Parameters
-
characters Number of characters
| void GroupList::CreateGroupBySelected | ( | Selection * | selection, |
| String & | groupName | ||
| ) |
| PartGroup * GroupList::GetGroup | ( | Variant & | var | ) |
| String GroupList::GetGroupName | ( | int | groupIndex | ) |
Returns the name of the group for the specified index.
- Parameters
-
groupIndex Group index
- Returns
- Group name
| int GroupList::GetPartId | ( | Variant & | val, |
| int | partIndex | ||
| ) |
| Variant GroupList::GetParts | ( | Variant & | var | ) |
Returns a list of parts from a specified group by specifying its name or ID.
- Parameters
-
var Group ID or name
- Returns
- Part list
| bool GroupList::IsValid | ( | ) |
Returns True if an object is valid.
- Returns
- Whether or not the GroupList objects in the list are valid
| int GroupList::NumGroups | ( | ) |
Returns the number of groups as an integer.
- Returns
- Number of groups
| int GroupList::NumParts | ( | Variant & | var | ) |
Returns the number of parts in a group.
- Parameters
-
var Group name or index
- Returns
- Number of parts
| void GroupList::RemoveGroup | ( | Variant & | var | ) |
Removes a group by specifying the group name.
- Parameters
-
var Group name
| void GroupList::RemovePartFromGroup | ( | Variant & | groupVal, |
| Variant & | val | ||
| ) |
Removes a part from the specified group by specifying the part name or part ID.
- Parameters
-
groupVal Group name val Part name/Part ID
| void GroupList::RenameGroup | ( | Variant & | var, |
| String & | newName | ||
| ) |
Changes the group name by specifying a new name and the old name.
- Parameters
-
val Old group name newName New group name