Blocks Vs. Groups

Blocks Vs. Groups

Anonymous
Not applicable
249 Views
3 Replies
Message 1 of 4

Blocks Vs. Groups

Anonymous
Not applicable
Hey VBA group,
I am writing a design for a customer and am making the following
assumptions, I was hoping that they can be validated by this news group,
also I have some questions:

Assumptions I am making
====================

Blocks are permanent (stored in the file)

Groups are permanent (stored in the file)

A block can be contained in other blocks, model or paper space

A block can contain any number of groups but a group cannot contain a block

Certain operations on a group are applied to all entities of that group such
as .erase, this cannot be achived with blocks where entities are manipulated
one at a time.

What I am developing
=================
=================

Now based on these assumptions, I am doing the following....

I am building a data structure which is a combination of volatile vs
permanent elements to store a dynamic table (ie. editable by the users) -
the table is being used to store a bill of materials list for manufacturing
assemblies. If you don't know what a bill of materials list is, its a list
of components used to make an assembly structure:

The user will see something like this:

BOM ID | Prt # | Description
100 | Part 55 | This is a screw
101 | Part 888 | This is a harness
200 | Part 999 | Steel 5 x 2 x 2

etc.

The way that this will work is as follows, permanently in the file will be

Non volatile data entities
===================

a. A block (the table the user can edit)

b. The block contains a set of groups (one group for each row of the table)

c. Each group contains a set of attributes (the columns (tagString) and
their values (textString) )

d. The actual graphical elements for the table which are box entities are
just stored with the block, and regenerated each time the table is modified.

e. There will also be some meta-attributes which are just added to the block

f. There will also be some column headers, which are just more graphical
elements attached to the block

Volatile Data Entities
===============

When the program is loaded the following will be instantiated into memory:

a. An object which represents the table as a whole.
b. The object contains a collection of the groups, remember the groups will
represent the tables rows.
c. The object also contains a collection of the meta attributes, referenced
by their tag name.

Does this data structure sound reasonable?

Also I have two further questions:
=========================

1. By adding an attribute to a group, the group being attached to a block,
does that attribute automatically get added to the block?

2. Do all of the selection set methods work with groups?

Any help would be extremely appreciated,

Dave
0 Likes
250 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
I think your confusing blocks/groups/attribute information

> Blocks are permanent (stored in the file)
True

> Groups are permanent (stored in the file)
True

> A block can be contained in other blocks, model or paper space
True

> A block can contain any number of groups but a group cannot contain a
block
False
Groups can contain any graphical object.

> Certain operations on a group are applied to all entities of that group
such
> as .erase, this cannot be achived with blocks where entities are
manipulated
> one at a time.
False, If I understand what you are saying here
Blocks are groups of objects/entities that are held within the autocad
database within a sequence.
the graphical object that you see on the screen is merely a reference to
the original sequence held
within the drawing database. Entities within a block can not be
maipulated one at a time unless you
maipulate the original sequence and update the references.

It sounds like you need to reexamin your approch using groups and blocks.
Attributes are used excusively
with blocks, they are analagus to variables within a program used to
store/present information.

Good Luck
0 Likes
Message 3 of 4

Anonymous
Not applicable
Hi Micheal,

Thanks for the kind examination of the email, most helpful. This sheds some
light on some experimentation that I have been doing.

Can you confirm the following line of thought....

I could not get AutoCAD to add an attribute to a group.

Therefore, I think I can confirm that you can only add graphical objects to
a group (like arcs, lines, circles).

I also discovered that groups cannot be added to blocks.

I will re-think my approach.

I still need an approach to group together attributes for rows in the
drawing file! I am not sure I like the idea of blocks within blocks

Dave

Michael Browne wrote in message <7uf99a$man3@adesknews2.autodesk.com>...
>I think your confusing blocks/groups/attribute information
>
>
>> Blocks are permanent (stored in the file)
>True
>
>> Groups are permanent (stored in the file)
>True
>
>> A block can be contained in other blocks, model or paper space
>True
>
>> A block can contain any number of groups but a group cannot contain a
>block
>False
> Groups can contain any graphical object.
>
>
>> Certain operations on a group are applied to all entities of that group
>such
>> as .erase, this cannot be achived with blocks where entities are
>manipulated
>> one at a time.
>False, If I understand what you are saying here
> Blocks are groups of objects/entities that are held within the autocad
>database within a sequence.
> the graphical object that you see on the screen is merely a reference to
>the original sequence held
> within the drawing database. Entities within a block can not be
>maipulated one at a time unless you
> maipulate the original sequence and update the references.
>
>
>It sounds like you need to reexamin your approch using groups and blocks.
>Attributes are used excusively
>with blocks, they are analagus to variables within a program used to
>store/present information.
>
>Good Luck
>
>
0 Likes
Message 4 of 4

Anonymous
Not applicable
David,
There is a big difference between blocks and groups.

You need to look at the internal structure (under the graphical).
Groups are individual entities brought together by extended information
tagged to the instance of that entity (only).
(the only reason they act or can act as one is through the programming
of the "Group" command)
Blocks are entities that used to reside individually but were compiled into
a definition and stored as non-graphical data.
The blocks that you see on the screen are references to that compiled data.
Now, if you place an attribute definition
within the entities that are to be used in creating the block definition,
then AutoCAD views those as retrievable storage
locations allowing the user to store variable information within the cozy
confines of the block. Programmatically, this can
give the appearance of a database ,TagName = FieldName TagString =
RecordValue

Groups can also get confused if copied and/or blocked

David Hadfield wrote in message
news:7ufk5e$m9j18@adesknews2.autodesk.com...
> Hi Micheal,
>
> Thanks for the kind examination of the email, most helpful. This sheds
some
> light on some experimentation that I have been doing.
>
> Can you confirm the following line of thought....
>
> I could not get AutoCAD to add an attribute to a group.
>
> Therefore, I think I can confirm that you can only add graphical objects
to
> a group (like arcs, lines, circles).
>
> I also discovered that groups cannot be added to blocks.
>
> I will re-think my approach.
>
> I still need an approach to group together attributes for rows in the
> drawing file! I am not sure I like the idea of blocks within blocks
>
> Dave
>
>
0 Likes