Jump to content
Developer Wiki and Function Reference Links ×

Do While (Menu Item Status)


Recommended Posts

Hey,

As a newcomer to Vectrscripts I was hoping someone might be able to suggest a solution for this problem:

I am currently editing an existing VS from 8.5.2 to make it compatible with 10.5. The script perfroms a sequence of grouping and ungrouping operations before exporting the file. I guess this is to ensure the file is made up of lines only before doing the export.

It does this procedure 7 times to ensure most levels of grouping are reached.

However, in 10.5 it ungroups until there are no more groups, then errors out as there are no more groups left to convert.

I need to find a way round this: I was thinking of putting a do while loop in that would run on the condition of the menu item "convert to group()" being valid. is this possible? is there a function that returns a boolean value for the status of a menu item? Any other suggestions for this problem?

All help much appreciated.

[Confused]

Link to comment

1- Do you really need the ungrouping?

(Couldn't you just export things as they are?)

2- I think there is no way to test the menu status, try to find out if there are any groups left before calling the ungroup.

3- Use a ForEachObject procedure to do the ungrouping and make it work only on groups. (Have a good look at the function reference documention and example scripts at NNA's customization pages)

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