eOnLockedLayer Error Creating FeatureLine.ByPolyCurve

When trying to create a FeatureLine.ByPolyCurve I get the error below.

Warning: FeatureLine.ByPolyCurve operation failed. 
eOnLockedLayer

I am attempting to extract the geometry from the line work in a shp file and create feature lines from it, all goes well until the FeatureLine.ByPolyCurve, the layer is not locked in Civil 3D so I assume this must be a db lock but I can’t figure out how to resolve this.

image