Prev: GB/T1804-m
Next: Warning: sketch text update failed
From: Heikki Leivo on 4 Nov 2007 06:27 > Heikki, that certainly seems promising, yet for me that code has > runtime error 438, Object does not support this property or method > on: line: model.SketchManager.InsertSketch False > Running SW 2006 > I have an open SW model, and tried with both a 3d and normal sketch > open. It seems that the SketchManager::InsertSketch method is not available in SW2006. You can use ModelDoc2::InsertSketch and ModelDoc2::GetActiveSketch instead. In SW2007 the sketch methods have been grouped to SketchManager object. Change the code to 'Get the active sketch Dim activeSketch As SldWorks.Sketch ' Set activeSketch = model.activeSketch 'If there is no active sketch, create one If activeSketch Is Nothing Then model.InsertSketch Set activeSketch = model.activeSketch End If |