You can replace a part with a subassembly or vice versa. You can replace one, more than one, or all instances of a component at the same time. You can replace a component with another that has the same name and type but comes from a different folder. ...
SOLIDWORKS Workgroup PDM API Help eDrawings API Help Replace Component Example (VBA) This example shows how to replace a component with a different component. '--- ' Preconditions: ' (1) Assembly is loaded. ' (2) Assembly component is selected. ' (3) The file c:\samples\whistle.sldprt...
// 1. Replaces all instances of the selected component with the// specified replacement component.// 2. Examine the Immediate window, FeatureManager design tree,// and assembly./// NOTE: Because the assembly is used elsewhere, do not save// changes.//---usingSolidWorks.Interop.sldworks;using...
Debug.Print("Opening an assembly..."); filename ="C:\\Users\\Public\\Documents\\SOLIDWORKS\SOLIDWORKS 2018\\samples\\tutorial\\advdrawings\\98food processor.sldasm"; swDoc12 = swDocMgr.GetDocument(filename, dt,false,outres)asSwDMDocument12; ...
Dim instance AsIAssemblyDocDim FileName As System.String Dim ConfigName As System.String Dim ReplaceAllInstance As System.Boolean Dim UseConfigChoice As System.Integer Dim ReAttachMates As System.Boolean Dim value As System.Boolean value = instance.ReplaceComponent...
You assign names to entities in the Entity Property dialog box. To access face and edge names in a lightweight component, either resolve the component or save the assembly in SolidWorks 2012 or later.Parent topic Other Assembly Techniques ...
You can replace a part with a subassembly or vice versa. You can replace one, more than one, or all instances of a component at the same time. You can replace a component with another component that has the same name and type but comes from a different folder. ...
All in same parent assembly 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 is in a subassembly, only instances in the subasse...
dt = SwDmDocumentType.swDmDocumentAssembly DimfilenameAsString filename ="C:\Users\Public\Documents\SOLIDWORKS\SOLIDWORKS 2018\samples\tutorial\advdrawings\98food processor.sldasm" swDoc12 =TryCast(swDocMgr.GetDocument(filename, dt,False, res), SwDMDocument12) ...
Const fileName As String = "C:\Users\Public\Documents\SOLIDWORKS\SOLIDWORKS 2018\samples\tutorial\api\block.sldprt" Dim swModel As ModelDoc2 Dim swAssy As AssemblyDoc Dim swSelMgr As SelectionMgr Dim swSelComp As Component2 Dim status As Boolean ...