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
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