The Group class gives you access to groups in D3PLOT. More...
The D3PLOT JavaScript API provides many class constants, properties and methods. For Arup to
be able to extend and enhance the API in the future any constant, property or method names beginning with a lowercase
or uppercase letter are reserved.
If you need to add your own properties or methods to one of the existing classes then to avoid any potential future conflict you
should ensure that the name begins with either an underscore (_) or a dollar sign ($) or the name is prefixed with your
own unique identifier.
For example if company 'ABC' need to add a property called 'example' then to avoid any potential future conflict use one of:
| Name | Type | Description |
| label (read only) | integer | The group label |
| model (read only) | Model | The Model that the group is in |
| title | string | The group title |
| type (read only) | constant | The type for the group (will be Type.GROUP) |
Detailed DescriptionThe Group class allows you to inspect groups in a model. See the documentation below for more details. |
Constructornew Group(model[Model object])DescriptionCreates a new group in D3PLOT |
The model to create the group in
ReturnsGroup object Return typeGroup |
ExampleTo create a group for Model m in D3PLOT var g = new Group(m);
|
Details of functionsAddFlagged(flag[Flag])DescriptionAdds flagged items to the contents of the group |
Flag (see AllocateFlag) set on items to add to the group
ReturnsNo return value |
ExampleTo add items flagged with flag f to group g: g.AddFlagged(f);
|
Empty()DescriptionEmpties the group (removes everything from the group) |
No arguments
ReturnsNo return value |
ExampleTo empty group g: g.Empty();
|
First(model[Model]) [static]DescriptionReturns the first group in the model (or null if there are no groups) |
Model to get first group in
ReturnsGroup object Return typeGroup |
ExampleTo get the first group in model m: var g = Group.First(m);
|
FlagContents(flag[Flag])DescriptionFlags the contents of the group |
Flag (see AllocateFlag) to set for the group contents
ReturnsNo return value |
ExampleTo flag the contents of group g with flag f: g.FlagContents(f);
|
GetFromID(model[Model], label[integer]) [static]DescriptionReturns the Group object for group in model with label (or null if it does not exist) |
Model to get group in
The label for the group in the model
ReturnsGroup object Return typeGroup |
ExampleTo get the group in model m with label 2: var g = Group.GetFromID(m, 2);
|
Last(model[Model]) [static]DescriptionReturns the last group in the model (or null if there are no groups) |
Model to get last group in
ReturnsGroup object Return typeGroup |
ExampleTo get the last group in model m: var g = Group.Last(m);
|
Next()DescriptionReturns the next group in the model (or null if there is not one) |
No arguments
ReturnsGroup object Return typeGroup |
ExampleTo get the next group after group g: g = g.Next();
|
Previous()DescriptionReturns the previous group in the model (or null if there is not one) |
No arguments
ReturnsGroup object Return typeGroup |
ExampleTo get the previous group before group g: g = g.Previous();
|
Total(model[Model]) [static]DescriptionReturns the total number of groups in a model |
Model to get group in
ReturnsThe number of groups Return typeinteger |
ExampleTo get the number of groups in model m: var total = Group.Total(m);
|