Community will be under system maintenance from July 31, 4PM PDT to Saturday August 1, 4PM PDT.

  • Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Allegro X Scripting - Skill
  3. How to remove an element from a group without deleting or...

Stats

  • Replies 0
  • Subscribers 19
  • Views 70
  • Members are here 0
More Content

How to remove an element from a group without deleting or disbanding the group using SKILL

JuanCR
JuanCR 1 day ago

Let's say you have a specific group of elements in a brd file and you want to remove one element from this group. How can you remove it without disbanding the group or deleting the element?

 

The SKILL function axlDBRemoveGroupObjects can be used to remove database objects from the specified group. Group members, though removed, are not deleted.

axlDBRemoveGroupObjects(o_group lo_members) ⇒ t/nil

Arguments:
  • o_group: The database ID of the group from which objects will be removed.
  • o_members: A list of database objects to be removed from the group. A single database ID can be substituted for a list.

This function removes the selected objects (lo_members) from the specified group (o_group). Neither the group nor the member is deleted.

The following SKILL code can be used to remove an object from multiple groups at the same time:

procedure( removeObjectFromGroup()
    let((objects_dbid group_dbd group_bibliotec elemnt group)

        axlSetFindFilter(?enabled list("all") ?onButtons list("noall" "symbols" "shapes"))
        axlClearSelSet()
        axlSingleSelectPoint()
        
        objects_dbid=axlGetSelSet()

        group_bibliotec=makeTable("groups" nil) 
        foreach(elemnt objects_dbid 
            foreach(group elemnt->parentGroups
                if(group then group_bibliotec[group]=append(group_bibliotec[group] list(elemnt)))
            )
        )
        foreach(group_dbd group_bibliotec
                axlDBRemoveGroupObjects(group_dbd group_bibliotec[group_dbd])
        )
    )
)

Explanation of the SKILL code:

The first step in the removeObjectFromGroup() function is to set the Find filter:

axlSetFindFilter(?enabled list("noall" "symbols" "shapes") ?onButtons list("noall" "symbols" "shapes"))

This will decide what kind of objects you can select on the canvas. In this case, from all possible objects, only “symbols” and “shapes” are selectable; “symbols” and “shapes” are already set to "on".

Then, selection of the objects can be done using the following function. Note that there are many functions that let you select objects in different ways. You can read more about it in Allegro SKILL Reference 22.1 > Select and Finds Functions. 

axlSingleSelectPoint()

This function allows you to select a single point on the screen. When this function is called, it will wait for an action from the user to pick a point. Everything that matches the Find filter will be selected. To get all objects selected, use:

objects_dbid=axlGetSelSet()

The variable objects_dbid can have multiple objects, and each one of these objects can belong to a different group. To classify which object belongs to each group, use a table (group_bibliotec):

group_bibliotec=makeTable("groups" nil)

In the below code, foreach is used to pass by each element of the objects_dbid list. Then, foreach is used again to pass by all parent groups that this element can belong to. The code then checks if the object does belong to any group. If it does, the current element is appended to the group_bibliotec with the matching key.

foreach(elemnt objects_dbid 
       foreach(group elemnt->parentGroups
                if(group then group_bibliotec[group]=append(group_bibliotec[group] list(elemnt)))
       )
)

To remove the components from the groups:

foreach(group_dbd list_groups_dbid
      axlDBRemoveGroupObjects(group_dbd objects_dbid)
)

  • Cancel
  • Sign in to reply
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2026 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information