Home > Community > Forums > Custom IC SKILL > Create group and add objects syntax

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Create group and add objects syntax 

Last post Sun, Aug 25 2013 4:34 PM by theopaone. 1 replies.
Started by psill000 25 Aug 2013 03:56 PM. Topic has 1 replies and 333 views
Page 1 of 1 (2 items)
Sort Posts:
  • Sun, Aug 25 2013 3:56 PM

    • psill000
    • Top 200 Contributor
    • Joined on Sat, Jun 1 2013
    • Posts 40
    • Points 755
    Create group and add objects syntax Reply

    Layout ver 6.1.5

    What is the proper syntax to create a group and add an object?

    tmp=dbCreateFigGroup(ccv() "testGrp0" geGetSelSet() '(0 0) "R0") or

    tmp=dbCreateFigGroup(ccv() "testGrp0" nil '(0 0) "R0")
    foreach(obj geGetSelSet() dbAddObjectToGroup(tmp obj))

    I tried tmp= dbGetGroupByName(cv "testGrp0")

     I tried the above and get an erro message: *Error* dbAddObjectToGroup: Invalid group object - db:0x16ef871b

     

    Thanks

    Thanks

    • Post Points: 20
  • Sun, Aug 25 2013 4:34 PM

    • theopaone
    • Top 75 Contributor
    • Joined on Tue, Feb 12 2013
    • Cedar Park, TX
    • Posts 113
    • Points 1,710
    Re: Create group and add objects syntax Reply

     There are two types of groups in OpenAccess, the logical group and the physical figGroup. They use different commands, you have them mixed.

    group - Logical connection between objects. Usually used by applications, no interactive editing support. Abutment used a group for tracking.

    dbCreateGroup, dbAddObjectToGroup, dbRemoveObjectFromGroup, dbGetGroupByName.

    figGroup - Physically joins multiple figures, edit as a single object.  To programmatically edit all the objects in the figGroup, edit the figGroup object.

    dbCreateFigGroup,  dbAddFigToFigGroup, dbRemoveFigFromFigGroup, dbGetFigGroupByName

    Ted

    • Post Points: 5
Page 1 of 1 (2 items)
Sort Posts:
Started by psill000 at 25 Aug 2013 03:56 PM. Topic has 1 replies.