After running macro in SolidWorks v2012, the building process starts and when I'm trying to create a new plane with command Set myRefPlane = Part.FeatureManager.InsertRefPlane(16, 0.68572951156078, 4, 0, 0, 0), the run-time error occurs, saying:
> Run-time error: '-2147417848' (80010108)
> Automation error. The object invoked has disconnected from it's clients.
Everything, that I found about this error is that it occurs, when object looses reference.
The last 4 commands in macro, including the line, where error occurs:
boolstatus = Part.Extension.SelectByID2("Line10", "SKETCHSEGMENT", 0, 0, 0, True, 0, Nothing, 0)
Set myFeature = Part.FeatureManager.FeatureCut3(True, False, False, 1, 0, 0.01, 0.01, False, False, False, False, 1.74532925199433E-02, 1.74532925199433E-02, False, False, False, False, False, True, True, True, True, False, 0, 0, False)
boolstatus = Part.Extension.SelectByID2("", "FACE", 1.75533563505326E-02, 0, -0.01702570304451, True, 0, Nothing, 0)
boolstatus = Part.Extension.SelectByID2("", "EDGE", 2.81043976244177E-04, -1.2177531240809E-04, -4.74850607275812E-03, True, 1, Nothing, 0)
Set myRefPlane = Part.FeatureManager.InsertRefPlane(16, 0.68572951156078, 4, 0, 0, 0)
Attaching my macro file. Could anyone help me?