No out of the box solution, but you may check these example add-ons in the Development Kit:
In the LibPart_Test example add-on there is an example for retrieving the physical location of the embedded library. You just need to copy your texture file into this location. A library reload may be needed.
In the Attribute_Test example you can find codes to create attributes. There is no example for creating surfaces, but it's very similar to other attributes.
In the Element_Test example there are a lot of codes as an example for modifying elements.