Jump to content
  • 0

Ungroup and retain original layer designation?


Bruce Kieffer

Question

10 answers to this question

Recommended Posts

  • 0

@Bruce Kieffer

   I don’t believe that is native VW functionality. However, it can be done with a script, actually two scripts.

 

   The first script would add a record to each object and store its layer name before grouping. The second would ungroup, then shuffle the objects back to their original layers. Finished scripts can be added to your workspace and assigned hot keys, making them appear like native functions or tools. 
 

   It would not be a very difficult task for someone familiar with Vectorscript, but it might be for a novice scripter. Query the VS forum for help. 
 

Raymond

Link to comment
  • 0

There is not way other than something like the script that Raymond is suggesting to do what you are asking.

 

Objects in a group must all be on the same layer.

 

When you ungroup, all the objects will be left on the layer the group was on.

 

There is not other way around it.  Vectorworks does not keep any history of what objects were or where they were "before"

 

Classes are different because you can have multiple different classes on a layer. So the class of the "Contained" object are not changed when you put them in a group.  When you ungroup you get back exactly what you put in.

 

  • Like 1
Link to comment
  • 0

@Bruce Kieffer this has bugged me too.

 

As Pat says that seems to be how it works - but I would have to disagree that there's "no other way around it".

 

If you can do it with a script, then VW can write it into program to keep layer history when creating a group. 

 

May be worth a wish list post?

 

 

Generally, I've come to trust Pat when he says asking VW to add/change existing workflow will very likely cause unintended consequences...

but in this case It seems like remembering layer associations should just be expected behavior with grouping and ungrouping.

 

Especially as grouping/ungrouping seems to be the recommended workflow for isolating related objects to edit in a less complicated environment.

  • Like 1
Link to comment
  • 0

Wish it if you wish, but I seriously doubt it will ever come from VW.

 

To do this every object in the drawing would effectively have to have an additional piece of data (the layer it was previously on) added. This will increase the file size and slow down every operation.

 

Or you could have it set so the data is only attached when you group the objects. And while it might work OK with a few hundred objects, what happens when someone with 100,000 object makes a group from them. The time to attach all the data would end up being significant.  As would the time time check each if they needed to be moved on ungroup.

 

Any solution would need to work reasonably for 2 object and 2 million objects. I don't see a way to make that work.

 

Especially for the 0.1% of the time that the functionality would be useful.

 

Clip Cube, Layer and Class Visibilities are better ways to isolate things if they are on multiple layers.

  • Like 2
Link to comment
  • 0

Additionally, what do you do when the old layer no longer exists?  What do you do when the old layer gets renamed? Look through every object and adjust its history.  A layer history for every object?  How about only objects in groups?  What happens when they get ungrouped?  Do they lose their history?  What about those times when you want the ungrouped objects to remain on the group's layer?  Which, by the way, is what I always want, because the "Undo" command will handle those few times when I might not.  Do we then get a question dialog about where to send ungrouped objects every time we ungroup.

 

It may be foolish prognosticate, but not going to happen in my lifetime. 

  • Like 1
Link to comment
  • 0

@hollister design Studio,

   I hope what I am about to say doesn't sound too negative toward your idea. On the surface it does sound reasonable and somewhat simple, but in reality it is a big ask.

 

   Both @Pat Stanford, and @Sam Jones, are right in their reasoning about the difficulty of implementing Layer History for grouped objects, but here's the simple truth about wanting VW to add a new feature — if the new feature can be accomplished via a user script, and in this case a very simple script, then it is not worth the engineering effort, or risk, to change the main program.

 

   To everyone's benefit, a script solution is effectively an instant solution, compared to the time one would have to wait for a feature change to be reviewed, accepted, and implemented by the engineering team. The process could take years. This is one scenario where the KISS philosophy is perfectly apropos. 

 

Respectfully,

Raymond Mullin

 

Link to comment
  • 0

So let's go back a step.

 

@hollister design Studio you seem to want this so you can group a bunch of objects (which collapses them to a single layer) so you can isolate them to work on some detail without the distraction of objects outside the group.  The first probably I see with this is that unless you are in Top/Plan, if the layers have different Z settings, the resultant group of objects will not be the same as the original objects on different layers.

 

@Bruce Kieffer what is your use case for this?

 

IF we can find some common ground as to what the implementation should do, then I might be willing to take a crack at writing it. MIGHT.

Link to comment
  • 0

Thanks Pat, but there's no need for you to spend your time making a script for me. If I remember ( getting harder as I get older!) that the grouped objects will not retain their original layer designation, then all I need to do is reassign them when I ungroup them. It's not that much work, and probably a lot less work than you writing the script.

 

Here's what I was doing: I am drawing the framing of my kitchen in preparation for a remodel. I grouped the studs in the west wall (active layer) with those in the north wall, then I gave them a new length in the OIP. When I ungrouped them they were all on the west wall layer. Another simple solution for me knowing they won't retain their original layer designation is to not group objects from different layers. Raymond's and your responses that there is not a way to do this is the answer I needed, so I am good now. Thanks. 

 

301231105_ScreenShot2022-10-06at3_44_53PM.thumb.png.6ead881f3734ef2d9fbac3e859789635.png

 

  • Like 1
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
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.

×
×
  • Create New...