I've written some Vb code to create a blind hole, (featureCut). I need to selected the face at the bottom of the hole to insert a sketch. I can get the face object and even find it's area, but cannot find a way to select the face to insert a sketch. Below is some of my code. I can pick the face using SelectById and the correct x,y,z values but I would need to covert these values to Model space values from the sketch coordinates. I was hoping for an eaiser way.
Thanks Warren
Set FeatureO = FeatureMgr.FeatureCut(True, False, False, 0, 0, 0.00635 * 2,
0.00254, False, False, False, False, 0.01745329251994, 0.01745329251994, False, False, False, False, 0, 1, 1)FaceArray = FeatureO.GetFaces 'get face array rtnval = FeatureO.GetFaceCount ' face count Set FaceO = FaceArray(0) 'get face#0
Set rtnval = selMgr.GetSelectedObject4(1) ' returns false
rtnval = ModelExt.SelectByID("", "FACE", x1, y1, 0.00635, False, 0, Nothing) Modeldoc.InsertSketch2 (True) 'creates sketch cursor in Solidworks because no face is selected
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---