Jump to content
  • 0
Sign in to follow this  
feldhusen

single class groupings

Question

when grouping a selection of objects that are all on the same class, it would be great if the group was to remain on that class.

Share this post


Link to post

1 answer to this question

Recommended Posts

  • 0
Guest

We get this request from time to time. It's a sensible idea, but there are some problems.

What should VectorWorks do when you group objects that belong to different classes? It would have to choose one of the classes somehow, or else use the None class. If the former, how should it decide which class to use? If the latter, is it desireable to treat groups one way for one special case where all objects have the same class, and another way in the more general case where they probably don't all have the same class?

Another problem is that groups are actual objects, so automatically assigning a class to them makes it difficult to get an accurate count of the other objects in that class. For example, say you've got a bunch of symbols representing windows, and each of them belongs to the Window class. You can take advantage of this fact to easily generate a report showing the number of windows by creating a worksheet and entering the formula "=COUNT(C='Window')" into a cell. This would become a lot less reliable if VectorWorks were to start automatically assigning classes to groups, as any groups of windows would also be members of the Windows class and would therefore be counted as well.

Finally, consider the same Window class above. What would happen if you created a group containing several windows and a door (which belonged to the Door class)? If the group belonged to the Window class, and if you set the Winodw class to be invisible, then the door would also become invisible. It might be tough to figure out what happened to the door, since all your other doors remain visible!

VectorWorks does allow you to put groups in classes, so it's easy to experiment with the behaviors described above. And sometimes it's useful to take advantage of them. But I think it would create a lot of confusion if VectorWorks tried to assign classes to groups automatically.

If you really want this behavior, the VectorScript to do it is quite simple. You could create a menu command using this script which could supplement or replace the current Group command. Here's an example which creates a group and sets it's class to their class if they're all the same, or else to None if they're different:

code:

procedure GroupWithClass;

var

classname : string;

allsame : boolean;

begin

classname := GetClass(FSActLayer);

allsame := (Count((Sel=true) & (C=classname)) = Count(Sel=true));

Group;

if (allsame) then SetClass(FSActLayer, classname);

end;

Run(GroupWithClass);

Hope that helps.

[This message has been edited by Caleb Strockbine (edited 03-30-2001).]

[This message has been edited by Caleb Strockbine (edited 03-31-2001).]

Share this post


Link to post

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
Answer this question...

×   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.

Sign in to follow this  

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...