Hi All,
I use the following code to add XAttribute to a named group element. But seems no success. I am unable to check named group element in Element Information dialog, so it is difficult to verify if I add XAttr successfully.
void AddXAttrToNamedGroup (NamedGroupP pNamedGrp)
{
EditElemHandle eeh (mdlNamedGroup_getElementRef(pNamedGrp), ACTIVEMODEL);
XAttributeHandlerId handlerId (XATTRIBUTEID_MajorId, XATTRIBUTEID_SubId);
eeh.ScheduleWriteXAttribute (handlerId, 0, dataSize, dataBuf);
eeh.AddToModel (ACTIVEMODEL);
}
BTW, I am not sure if I need to call AddToModel after calling ScheduleWriteAttribute ?
Any help are appreciated !
Xue