Jump to content
Developer Wiki and Function Reference Links ×

NumSelectedObjects


michaelk

Recommended Posts

I'm looking for a way to get the total number of selected objects in the document.

 

Anybody have experience with NumSelectedObjects?  It reads like it should do what I want.  As opposed to NumSObj(h) which returns selected objects on a specific layer.

 

For me it's only returning the number of selected objects on the active layer unless the layer options are set to show/snap/modify others.

 

 

Link to comment

The command more accurately returns “all selected and editable” — basically the objects that would be affected by running a menu command. 
 

Using Count() may give you what you need, with the benefit of controlling descent into groups, etc. Vectorworks maintains selection flags for objects you can’t edit, including objects in containers, on hidden layers or sheet layers, etc, so usually you don’t really want to act on everything with a selection flag, only those items the user has deliberately selected. 

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