Select all group instancies

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
barigazy's picture

*.ms

Or just download attachment

AttachmentSize
getgroupinstance.ms 938 bytes

barigazy

barigazy's picture

code

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)

barigazy

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.