Set this property to 'True' before creating the line: SketchManager::AddToDb. And restore to 'False' after the line is created.
Regards, Artem Taturevych | Snr. Developer | IC3D ANZ
IC3DSteel – New Steel Solution for SolidWorks
Thank you, but we are already doing this in our initialization.
The user had a custom part template which already contained a Sketch1. This meant we were closing the sketch when we thought we were opening it. Hence, CreateLine failed because no sketch was current active.