Gonda Posted December 27, 2014 Share Posted December 27, 2014 Hi All, So, maybe I'm missing something obvious, but I can't seem to find a way to create a selective group via Scripting. Example: There are 3 objects selected. Based on some processing, I want to create a group containing 2 of these objects. Group() will create a new group, but it only works on all of the selected objects. The BeginGroup() function can do selective grouping; however, as far as I can tell, it can only handle creating a group based on newly created objects. Anyone have any thoughts or am I just missing something completely obvious? Thanks, -g Quote Link to comment
MullinRJ Posted December 28, 2014 Share Posted December 28, 2014 Jon, You could create a group with one object then add new objects to it with SetParent(). Or, deselect objects from your selection list with SetDSelect(), then use GROUP to group the remaining selected objects. HTH, Raymond Quote Link to comment
JBenghiat Posted December 29, 2014 Share Posted December 29, 2014 You may be interested in GeginGroupN: http://developer.vectorworks.net/index.php/VS:BeginGroupN You can easily create an empty group and return its handle. Then use SetParent to add the objects to the group. -Josh Quote Link to comment
Recommended Posts
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.