hello,
I want to copy attributes from one model to another and here is the below code which aint working.
Can somebody correct this or let me knw if this is correct?
I have created a seperate function to copy model attributes from source model to target model.
function copyAttributes(osourcemodel, oTargetModel)
{
var oAttrList = osourcemodel.AttrList(g_nLoc);
// Copy attributes
for (var j = 0 ; j < oAttrList.length ; j++ )
{
var oAttr = oAttrList[j];
if (oAttr.TypeNum() != Constants.AT_NAME_LGINDEP)
{
var oNewAttr = oTargetModel.Attribute(oAttr.TypeNum(),g_nLoc);
if (oNewAttr="")
{
oNewAttr.setValue(true);
}