Unable to Add layer in Property

Hi I have created plugin and with this command i am creating poly-line which has some property like color, layer length After setting Reference Edit (Automatic) it should show the all property but it shouldn't shows the selected layer(always shows 0 layer) other property are working fine like color & length. Please provide me some clue or where i can set the layer in property in code.