You are on page 1of 16

Getting Started With Named Groups

Mark Anderson
Technical Mgr
Bentley Developer Network

Named Groups
Came in to the product in V8.1
Used to relate elements
Similar to Graphic Groups

Flexible change propagation


Programatic features

Named Groups
Flexible way to group elements
Multiple Change Propagation settings
Elements can be in multiple groups
Groups can be in other groups
Elements can be in different Models
Elements are not changed when added to a group

Named Groups
Various Options for propagating change
Each member can specify how:
Forward changes are propagated to other members
Backward changes are propagated from other members
Group changes are propagated to other groups

Options are:
GroupLock only when the Group Lock is on
Always regardless of the Group Lock
Never do not propagate

Named Groups
Standard Change Propagation
Active
F o rw a rd ,b a c kw a rd (G ro u p L o ck), G ro u p (n e ve r)

Passive
F o rw a rd (n e v e r),b a ckw a rd (G ro u p L o ck), G ro u p (n e ve r)

Custom
U se r d e fin e d

Named Groups
1
4 2 5
3

1,2,3 are NamedGroup Column


4,2,5 are NamedGroup Row
Move element 1:
2,3 move if 1 has forward propagate and 2,3 have Backward
propagate
4,5 move if 2 has group propagate and 4,5 have backward

Named Groups
Examples In Action
Demonstration in MicroStation

Named Groups
API
The user view is built from the same API

MDL
mdlNamedGroup_XXX functions

VBA
NamedGroupElement Object
NamedGroupMember Object

Named Groups
Named Groups are stored in the design file as a Table Element
(type 110)
Named Group Components are stored as Table Entry Element
(type 111)

Named Groups
The MDL API is encapsulated in the mdlNamedGroup function
group.
In this family of functions you can:
Create/Modify Groups or Members
Search/Query based on the Group or Member

Named Groups
To Create a NamedGroup
mdlNamedGroup_create ( );
mdlNamedGroup_addMember ( );
mdlNamedGroup_writeToFile ( );

Named Groups
To process through all the named groups in a file use :
mdlNamedGroup_traverseGroups ( );

To process through all the Elements in a NamedGroup use:


mdlNamedGroup_traverseMembers ( );

The information on the Group is accessed through:


mdlNamedGroup_getXXX functions

Named Groups
The VBA API is encapsulated in two Objects.
The NamedGroupElement is the Collection of Named Groups
Encapsultes all the housekeeping required for
creating/processing NamedGroups

NamedGroupElement is the entry in the NamedGroup


It contains the information on how and element behaves within
that NamedGroup

Named Groups
Can be used with DisplaySets
mdlNamedGroup_addToDisplaySet
mdlNamedGroup_removeDisplaySet

Named Groups
Example Applications

Circuit-VBA uses named groups to collect the components.

NamedGroupExplr creates NamedGroups and displays list


of NamedGroups in the File.

Named Groups
Q&A

You might also like