Complete the code to create a new sub-assembly in SolidWorks.
SubAssembly = swApp.[1]("Assembly")
Use NewDocument to create a new assembly document in SolidWorks.
Complete the code to add a component to the sub-assembly.
component = SubAssembly.[1]("C:\\Parts\\Part1.sldprt")
AddComponent5 is the correct method to insert a component into an assembly in SolidWorks API.
Fix the error in the code to properly save the sub-assembly.
SubAssembly.[1]("C:\\Assemblies\\SubAssembly1.sldasm")
SaveAs is the correct method to save the document to a specific file path. Save saves the current document without specifying a new path.
Fill both blanks to properly open and activate a sub-assembly document.
doc = swApp.[1]("C:\\Assemblies\\SubAssembly1.sldasm") doc.[2]()
OpenDoc6 opens the document and Activate makes it the active window.
Fill all three blanks to create a sub-assembly, add a component, and save it.
subAsm = swApp.[1]("Assembly") subAsm.[2]("C:\\Parts\\Part2.sldprt") subAsm.[3]()
Create a new assembly with NewDocument, add a component with AddComponent5, then save with Save.
