Ok I have a little problem, if anyone has any suggestions I would be happy to hear them.

Goal

In a pre-existing illustration I wish to take current callouts (generated using the callout tool) and break them down into elements, remove the rectangle (with white fill), and shorten the line so it no longer intersects the number (the rectangle provides a shadow effect around the number).

Progress

So far I have selected all callouts and converted into elements. This puts each callout into a group, I Select All and using the FirstSelectedElement mixed with the 'UNGROUP SELECTION' (cannot get the optinoal parameter DEEP to work) function Isodraw 7.1 crashes. Can anyone provide a different solution/fix?

I have tried to avoid using FirstSelectedElement and Select All and I am trying to find a way to select each group individually using a loop (I think when Ungroup Selection is executed whilst multiple groups are selected Iso crashes) but I cannot find a way of selecting group individually.

MACRO Callout_to_Elements
DEFINE el as Element
SELECT IF type IS "callout"
CONVERT SELECTION INTO ELEMENTS
SELECT ALL
el = ActiveDoc.FirstSelectedElement
While (Exists(el) = True)
If (el.Type = "Group") && (el.lastChild = "line") Then # lastChild ensure a group that previosuly was a callout is selected and not another group
UNGROUP SELECTION
End If
el = el.NextSelectedElement
el = el.NextSibling
End While
END MACRO

Oh I am not expecting to shorten the line that intersects the number, I assume this will have to be done manually which I am happy with.

Nice way of approaching the situation. It works like you said, although another problem is other groups may be on the same layer as the callouts so select all will select groups that are not meant to be ungrouped.

Ideally I can think of 2 approaches:

Select all callouts before breakign and move to a Temp layer, lock other layers, convert callouts to elements, select all groups, group, select all, ungroup deep.

Select each callout group individually (via a logical filter - see IF in code above), then executing ungroup on each group in turn.

My thoughts are 1 is the likely choise as I am pretty sure it can be done, although its a bit of work. Is number 2 possible?

The problem with Select All then grouping and ungroup deep is their may be other groups on the same layer as the callouts that should not be ungrouped or affected in anyway and I do not at this time know a way to select these groups seperately based on specific criteria (see logic in IF Statment above).

As for #2 I can select all and cycle through each group, with the 'FirstSelectedElement' and 'NextSelectedElement' but when I execute the Ungroup (Deep or not) function on each selection this crashes isodraw every single time. I need a way to select each group individually with using Select all and First/Next SelectedElement, I dont think isodraw will crash then.

But to avoid the crashing I could use your method but would require more work (temp layer) and a re-ordering to ensure only callouts where temporarily moved.

Thanks for the assistance, bgraffman it worked perfectly, I am just trying to learn from your code - thanks. Trevor cheers for the assistance, the method you have described is similar to what I was going to do if no solution was resolved, and moving the callouts from other elements does have a distinct advantage although for this project I think the Logical filter on the IF statement is solid for this project but for others may not be so easy.