Jump to content
Developer Wiki and Function Reference Links Read more... ×
Sign in to follow this  
Kellie

Ungroup without Dialog box

Recommended Posts

Is there a way to ungroup to a low level using vectorscript without the dialog box warning coming up? I need the warning to stay in the preferences when manually ungrouping but to ignore it when a script does it.

Share this post


Link to post

Are you talking about the "Do you really want to ungroup high level objects" dialog?

If so, I don't know of any simple way to bypass the message using Vectorscript. The UNGROUP; command in VS brings up the same error message.

You might be able to walk the object tree using FInGroup and/or FIn3D and the appropriate view and then set the parent of each object to the active layer.

It looks like it might work, but all the fringe cases are likely to be a killer.

Good Luck,

Pat

Share this post


Link to post

Hi Pat, the reason I need to bypass a crash bug that I have in Vectorscript in Vectorworks 2008. Script crashes after deleting a high level object it doesn't like in this version before changing sheet, almost like a memory leak problem. But ungrouping the objects before deleting them seems to bypass it. Maybe using FInGroup and deleting the low level objects one at a time will bypass it.

Way too many of my scripts no longer work because there are so many bugs.

Thanks for your suggestion.

Share this post


Link to post

Kellie,

What object are you trying to delete and where are you trying to delete it from? The details are important here so we can identify the root of the problem.

One thing to try is to move the object to a layer using the setparent callthen delete it.

Kevin

Share this post


Link to post

What kind of bugs are you seeing? I have found VS to be quite stable.

The change in VW2008 to go entirely to RGB colors has certainly made some things that relied on the old standard color palette locations fail. And there are certainly a lot of functions I would like to see missing, but I haven't come across many things that have gotten broken in later version of VW that were once working.

Pat

Share this post


Link to post

Vectorworks itself generally is stable, vectorscript on the other hand has bugs. We have had to go back to VW sp1 because sp3 was unable to call filled arrow heads using the marker() command. In sp1, the arrow heads were mixed around marker(1) became marker (9) from memory. Sp3, no filled arrowhead at all. Made one of our main tools completely useless.

This current problem is with a script which creates a print view so that multiple sheets can be printed at the same time or sent to a single pdf. Has worked fine since version 9, now in 2008 when there are associative dimensions within the original layers it will create the printing layers fine, but unless those highlevel objects are ungrouped prior to deleting the layers the application crashes when going back to the original sheet. (This happens in sp1 & sp3)

And then minor issues I have with some high level objects when they are copied onto a printing layer using vectorscript look like their scales are incorrect (redraw and redrawall do nothing) unless they are placed on the front most print layer or moved manually.

Moving to Vectorworks 2008 has been the most frustrating upgrade so far for us, and this office has been using it since Minicad 6.

As a note, I have reported that arrow issue to both our supplier and on the bug report page on this website, no reply from either.

Share this post


Link to post

Kellie,

The reason you are having problems with the Marker() call is that is it obsolete as of 2008.

Marker() has been replaced by SetDefaultBeginningMarker and SetDefaultEndMarker. Several other Set/Get type marker calls have been added in order to support fifferent markers on each end of the line.

If you have a smaple file and a test script that will cause VW to crash please submit the file and the script to bugsubmit@nemetschek.net.

Share this post


Link to post

Kellie, did you try using "HUngroup" function? I just tested this script on a 3D custom object and on a group of simple shapes, and no dialogs came up.

script...

procedure scriptmain;

var

hGr: handle;

begin

{assuming that a Group is selected...}

hGr:= FSActLayer;

if hGr<>nil then

begin

HUngroup(hGr);

end;

end;

run(scriptmain);

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
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.

×