Replaces all instances of the selected component that are in the same assembly level. If a selected component is in the top-level assembly, only instances in the top level are replaced. If a selected component i
vComponents.Length - 1 swDmComponent = DirectCast(vComponents(i), SwDMComponent6) If swDmComponent.Name = "shaft washer" Then Dim bResult As Boolean = swDmComponent.Replace("C:\Program Files\SolidWorks Corp\SolidWorks\samples\tutorial\smartcomponents\lockwasher.sldprt", "Default", False) Debug....
Click Replace Components (Assembly toolbar). Click File > Replace Right-click a component and select Replace Components. Set options as described below, then click . The selected component instances are replaced. If you chose Manually select, choose the configuration to open in the Configurations...
' (1) Assembly is loaded. ' (2) Assembly component is selected. ' (3) The file c:\samples\whistle.sldprt exists, and the name ' of the component is not the same as the selected component's name. ' ' Postconditions: Selected component is replaced with component ' in the specified...
' (2) Assembly component is selected.' (3) The file c:\samples\whistle.sldprt exists, and the name ' of the component is not the same as the selected component's name.'' Postconditions: Selected component is replaced with component ...
If swDmComponent.Name = "shaft washer" Then Dim bResult As Boolean = swDmComponent.Replace("C:\Program Files\SolidWorks Corp\SolidWorks\samples\tutorial\smartcomponents\lockwasher.sldprt", "Default", False) Debug.Print("Replacing shaft washer with lock washer..."...
If swDmComponent.Name = "shaft washer" Then Dim bResult As Boolean = swDmComponent.Replace("C:\Program Files\SolidWorks Corp\SolidWorks\samples\tutorial\smartcomponents\lockwasher.sldprt", "Default", False) Debug.Print("Replacing shaft washer with lock washer..."...
' (2) Assembly component is selected.' (3) The file c:\samples\whistle.sldprt exists, and the name ' of the component is not the same as the selected component's name.'' Postconditions: Selected component is replaced with component ...
' 5. Substitute your_license_key with your SOLIDWORKS Document ' Manager license key. ' 6. Open the Immediate window. ' ' Postconditions: ' 1. Inspect the Immediate window. ' 2. The first instance of the shaft washer component is ' replaced with a lock washer in the document. '...
Const fileName As String = "C:\Users\Public\Documents\SOLIDWORKS\SOLIDWORKS 2018\samples\tutorial\api\block.sldprt" Dim swApp As SldWorks.SldWorks Dim swModel As SldWorks.ModelDoc2 Dim swAssy As SldWorks.AssemblyDoc Dim swSelMgr As SldWorks.SelectionMgr Dim swSelComp As SldWorks.Component2 Dim...