Jump to content

Control of Class When Grouping


Recommended Posts

quote:

Originally posted by Machine Designer:

Would someone please tell me how to predetermine the class of a new group. I have to edit the class after each group command.


Groups default to the 'None' class. There are several reasons for this:

- groups are meant to be like transparent containers which always let you see what's inside them;

- if a group's class is made invisible, then all the objects in that group become invisible too no matter what group they're in;

- it's not clear what class should be assigned to a new group -- the current class? the class of the first selected item?

The 'None' class seems like a good default class for groups if only because most people leave the 'None' class visible at all times.

There's been plenty of discussion of this matter in the past on the VectorWorks list. If you're interested, check the archives:

http://peach.ease.lsoft.com/archives/vectorworks-l.html

If you create lots of groups, it may help speed your work to realize that you can set the class for several groups at the same time (as long as you're setting them all to the same class).

Caleb Strockbine

caleb@nemetschek.net

Link to comment

Thanks, jfmarch. I do set the class before drawing objects and it has no effect on the class of the group. Caleb pointed out that all groups become class "none".

My belief is that we should have the option of presetting a class so parts & groups go in. Then we don't have to waste the time resetting class for each group.

Maybe I am using groups too much? Is there another way to accomplish the same thing? (Please see my reply above)

Link to comment

Thanks, Caleb. I went to the Peach disussion but couldn't find anything on the class of groups.

It just seems logical that since I need to set the class for an object I will draw, that the same setting should determine the class of the group I will make.

For instance, a plate will have bolt holes and other plates or bars welded on. It needs to be grouped in the same class as it's component parts were drawn in.

Because it is a specific part of an assembly that I need to see by itself later, some or all of the other parts (groups) will need to be greyed or turned off by making their classes invisible.

I know I could leave the fragments of the weldment ungrouped but then it would be harder to pick it for duplicating or moving.

I am using class to distinguish parts of assemblies instead of layers because I must export everything to AutoCRUD and VW "class" translates to AutoCRUD "layer".

I have been designing and drafting for 40 years, 17 on CAD. However I still am searching for a better scheme for organizing machinery drawings.

Link to comment

quote:

Originally posted by Machine Designer:

Thanks, Caleb. I went to the Peach disussion but couldn't find anything on the class of groups.

Try this: http://peach.ease.lsoft.com/scripts/wa.exe?

S2=vectorworks-l&q=group+and+class+and+None&s=&f=&a=1+Feb+2000&b=

The thread titled 'groups to none' seems particularly relevant. I hope that helps.

quote:

For instance, a plate will have bolt holes and other plates or bars welded on. It needs to be grouped in the same class as it's component parts were drawn in.

Because it is a specific part of an assembly that I need to see by itself later, some or all of the other parts (groups) will need to be greyed or turned off by making their classes invisible.

Clearly, different approaches suit different people and different projects. But it sounds like you might do well to leave all your groups in the 'None' class, making sure that everything else has a an appropriate class. This way, groups become 'invisible' containers. Just make sure that the 'None' class is always left visible.

Put another way, if all the objects in a group have the same class, and if the None class is always kept visible, then you don't really get any more control over the visibility of your objects by setting the class of the group to that of the objects it contains.

Caleb Strockbine

caleb@nemetschek.net

[This message has been edited by Caleb Strockbine (edited 08-14-2000).]

Link to comment
  • 1 year later...

Well, this is an old topic, but I feel like it's one worth revisiting. I agree with the suggestion to have a preference to set about where groups get classed. I frequently need to work with only one class visible and every time I group, the group disappears. It would be great to allow it to class to the active class or the none class, based on a preference setting. My co-worker and I end up doing a lot of extra keystrokes because of this.

Link to comment

Machine: It sounds like I use vworks in much the same way you do,though the materials differ and I don't have to go to acad. Well...maybe it's pretty different.

I usually duplicate groups in place and move them to a new layer in order to see the sub-assemblies by themselves. On the new layer more detail dimensions are added without cluttering the main drawing. Sometimes I will add more drawing detail.

Of course, I have no idea what this would do to acad. Just thought I'd share a different approach even if it won't work for you.

Link to comment

Or how about this ? when all selected objects to be grouped are assigned to the same class, VW has the option (preference setting) to assign the group to the same class as the selected objects. And/or if objects in different classes are to be grouped, then a dialog box with radio buttons listing all the selected classes pops up and the user can select the class to which he wants the group assigned, including the None class. If these options were selectable as VW preferences than new users might grasp the "Classes" concept (very difficult for some) more quickly and experienced users could turn off these options if so desired.

Link to comment

This might do the trick:

PROCEDURE GroupToCurrentClass; { ? Petri Sakkinen 2002 }

VAR i, n : INTEGER; theClass : STRING; objClass : ARRAY[1..1000] OF STRING; obHd, gHd : HANDLE;

PROCEDURE StoreObjectClass;BEGIN i := i+1; objClass := GETCLASS(obHd);END;

PROCEDURE RestoreObjectClass;BEGIN i := i+1; SETCLASS(obHd, objClass);END;

BEGIN i:=0; theClass := ACTIVECLASS; obHd := FSACTLAYER; WHILE obHd <> NIL DO BEGIN StoreObjectClass; obHd := NEXTSOBJ(obHd); END; GROUP; SYSBEEP; i:=0; gHd := LSACTLAYER; SETCLASS(gHd, theClass); obHd := FINGROUP(gHd); WHILE obHd <> NIL DO BEGIN RestoreObjectClass; obHd := NEXTOBJ(obHd); END;END;

RUN(GroupToCurrentClass);

Link to comment

Looking at the discussion again, decided to improve my old script a bit to handle grouping objects in single class: the group inherits the class of its elements if they are all in the same class. The first version puts the group always in the current class.

Now, nested groups don't behave well in either version - someone might modify this to be recursive, ie. go to groups withing groups within groups. I don't have the time!

Make it a menu command - something like SuperGroup.

PROCEDURE GroupToCurrentClass2; { ? Petri Sakkinen 2002 }

VAR i, n : INTEGER; theClass, currentClass, prevClass : STRING; objClass : ARRAY[1..1000] OF STRING; obHd, gHd : HANDLE; allTheSame : BOOLEAN;

PROCEDURE StoreObjectClass;BEGIN i := i+1; currentClass := GETCLASS(obHd); objClass := currentClass; IF NOT(prevClass = currentClass) THEN allTheSame := FALSE; prevClass := currentClass;END;

PROCEDURE RestoreObjectClass;BEGIN SETCLASS(gHd, theClass); obHd := FINGROUP(gHd); WHILE obHd <> NIL DO BEGIN i := i+1; SETCLASS(obHd, objClass); obHd := NEXTOBJ(obHd); END;END;

BEGIN i := 0; allTheSame := TRUE; theClass := ACTIVECLASS; obHd := FSACTLAYER; prevClass := GETCLASS(obHd); WHILE obHd <> NIL DO BEGIN StoreObjectClass; obHd := NEXTSOBJ(obHd); END; GROUP;

i := 0; gHd := LSACTLAYER;

IF allTheSame THEN SETCLASS(gHd, currentClass) ELSE RestoreObjectClass;

END;

RUN(GroupToCurrentClass2);

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...