Relative Content

Tag Archive for c#solidworkssolidworksapi

How do I select a single hole in a hole feature that contains multiple holes?

public void MultipleSelection(string childNodeValue1, string childNodeValue2) { try { SldWorks swApp = Utility.ConnectToSolidWorks(); ModelDoc2 swModel = (ModelDoc2)swApp.ActiveDoc; swModel.ClearSelection2(true); string targetComponentName1 = childNodeValue1.Split(new[] { ” – ” }, StringSplitOptions.None)[0]; string targetFeature1 = childNodeValue1.Split(new[] { ” – ” }, StringSplitOptions.None)[1]; string targetComponentName2 = childNodeValue2.Split(new[] { ” – ” }, StringSplitOptions.None)[0]; string targetFeature2 = childNodeValue2.Split(new[] { ” – […]

How do I select a single hole in a hole feature that contains multiple holes?

public void MultipleSelection(string childNodeValue1, string childNodeValue2) { try { SldWorks swApp = Utility.ConnectToSolidWorks(); ModelDoc2 swModel = (ModelDoc2)swApp.ActiveDoc; swModel.ClearSelection2(true); string targetComponentName1 = childNodeValue1.Split(new[] { ” – ” }, StringSplitOptions.None)[0]; string targetFeature1 = childNodeValue1.Split(new[] { ” – ” }, StringSplitOptions.None)[1]; string targetComponentName2 = childNodeValue2.Split(new[] { ” – ” }, StringSplitOptions.None)[0]; string targetFeature2 = childNodeValue2.Split(new[] { ” – […]