ScriptSpot

Forum topic · Scripts Wanted

Select all group instancies

By 1rv · 2012-09-30

Description

Is there script that does it?
Thanks in advance.

Comments (2)

*.ms

barigazy · 2012-09-30

Or just download attachment

Attachments

code

barigazy · 2012-09-30

This is your tool

try(destroyDialog ::bgaRoll)catch()
rollout bgaRoll " Select Group Instances"
(
fn getGroupInstance selObj =
(
local groupHead = case classof selObj of (
(Array): (
local obj = (for obj in selObj where isGroupHead obj collect obj)[1]
if obj != undefined do obj
)
(Dummy): (if isGroupHead selObj do selObj)
default: undefined
)
if groupHead != undefined do
(
InstanceMgr.GetInstances groupHead &ghInstances
select ghInstances
)
)
button btn "Select Group Instances" pos:[5,5] width:150 height:20
on btn pressed do
(
if selection.count == 0 then (messageBox "Select en Group (if is closed) or GroupHelper (if is opened)" title:"WARNING" beep:off) else
(
local selObj = if (sel = getCurrentSelection()).count == 1 then sel[1] else sel
getGroupInstance selObj
)
)
)
createDialog bgaRoll 160 30 style:#(#style_titlebar, #style_sysmenu, #style_toolwindow)