Skip to main content
1-Visitor
March 29, 2010
Question

Trying to delete selected items within groups

  • March 29, 2010
  • 1 reply
  • 7835 views
We use a lot of 3d data from IGES files and they create a "Border" line type for internal surfaces. We keep some of these but most of them want deleting and I'm trying to do a macro that allows you to select an area on a drawing and delete the "Border" linetype within that area. The macro is just this: Subselect if Pen is equal to 'Border' Delete selection Select none You would think that when the selection arrow is set to (+) (i.e. selection within groups), it would delete all the border lines within the selected area. But if a grouped item is wholly within the selected area (you can tell this because the selection shows it as 1 item rather than individual lines), then it does not delete the border lines within that group - it only does it for partially selected groups. How do I make it work globally on the selected area regardless of whether a group is wholly or partially selected?

    1 reply

    12-Amethyst
    March 29, 2010
    If I'm following correctly, it sounds like you want to change the functionality of the selection tool basically. I might recommend a slightly different approach to selection. Use the lasso tool instead. This will grab partially selected items. To use it, have one of the selection tools selected and then hold down Alt when you are clicking and dragging.
    TimSharp1-VisitorAuthor
    1-Visitor
    March 29, 2010
    Sorry I didn't explain what I'm trying to do very well. I do already use the lasso tool to select. The idea is that we select an area of the drawing, then run the macro to delete all the 'Border' line type within the selection. If just part of a grouped element is selected, all the 'Border' lines in that grouped item that lie within the selection are deleted - which is OK. However, if a whole grouped element is within the selection, the macro won't delete any of the 'Border' line type in that grouped element - which is not OK. I'm just trying to find a way to make it look for and remove the 'Border' line type in a selected area of the drawing, including grouped elements. The ME10 macro language had a global function to make it work through everything selected, but there doesn't seem to be one in Isodraw.
    TimSharp1-VisitorAuthor
    1-Visitor
    April 7, 2010
    Thanks Trevor, sorry only just had time to look at the forums. This is a big step forward as I couldn't think of a way of making it delete items when they were selected. Unfortunately our iges files do come with lots of nested grouped items so this will only get groups in the top level and I'll need to find a way of getting down through an unknown number of grouped levels if that's possible. Being able to alter specific items within a selected area regardless of groupings would open up lots more possibilites for macros. My previous CAD macro language for ME10 had a 'global' parameter that worked on everything selected regardless of grouping or layers. Isn't the Isodraw selection tool with the + option supposed to do that? But thanks again, every time you give an example macro, you show me new ways of achieving things.