SolidWorks API: SelectByID
SolidWorks API: SelectByID
(OP)
Has anyone tried using the ModelDoc::SelectByID function to select faces? I have, and no matter what the points come out hundredths and thousandths off.
I bascially need to place holes in various locations, is there a function that will move these types of features?
I bascially need to place holes in various locations, is there a function that will move these types of features?






RE: SolidWorks API: SelectByID
"Set select = modelDoc.SelectionManager",
count the selected items using
"NumObj = select.GetSelectedObjectCount"
for each NumObj control if it's a face using if...then...else
"If selMgr.GetSelectedObjectType(I) = 2..."
Finally get the face using
"Set SelectObj = selMgr.GetSelectedObject2(I)"
Hope that can help.
Regards
RE: SolidWorks API: SelectByID
I have also tried to move the sketch (created by the hole wizard) by changing the location of the centerpoint. I have tried the SketchPoint::SetCoords(xx,yy,zz) function, but for some reason, it does not allow me to set the point.