Is it possible to automatically add feature Definitions depending on the layer name?

I have a CAD drawing with lines in dozens of layers. Is it possible to automatically add Feature Definitions to this lines depending on the layer name?

In this case it is a lot of work to add the feature definitions manually one by one.  

Thanks in advance, 

Louis