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... | |
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:
| void GroupList::AddPartToGroup | ( | Variant & | groupVal, |
| Variant & | val | ||
| ) |
Adds a part to a group that is specified by the part name or part ID.
| groupVal | Group name |
| val | Part name or ID |
| void GroupList::CreateGroup | ( | String & | groupName | ) |
Creates a blank group by specifying the name.
| groupName | Group name |
| void GroupList::CreateGroupByNameStart | ( | int | characters | ) |
Groups parts with the first part of their names that match the specified number of characters.
| 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.
| groupIndex | Group index |
| 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.
| var | Group ID or name |
| bool GroupList::IsValid | ( | ) |
Returns True if an object is valid.
| int GroupList::NumGroups | ( | ) |
Returns the number of groups as an integer.
| int GroupList::NumParts | ( | Variant & | var | ) |
Returns the number of parts in a group.
| var | Group name or index |
| void GroupList::RemoveGroup | ( | Variant & | var | ) |
Removes a group by specifying the group name.
| 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.
| 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.
| val | Old group name |
| newName | New group name |