Complete the code to create a new configuration named 'Config1' in SolidWorks assembly.
AssemblyDoc.AddConfiguration2("[1]", "", "");
The method AddConfiguration2 requires the configuration name as the first argument. 'Config1' is the correct name to create the new configuration.
Complete the code to activate the configuration named 'Config2' in the assembly document.
AssemblyDoc.ShowConfiguration2("[1]", true);
The method ShowConfiguration2 activates the configuration by its name. 'Config2' is the correct configuration to activate here.
Fix the error in the code to delete the configuration named 'Config3' from the assembly.
AssemblyDoc.DeleteConfiguration("[1]", true);
The DeleteConfiguration method requires the exact name of the configuration to delete. 'Config3' is the correct name here.
Fill both blanks to set the suppression state of a component named 'Part1' in configuration 'ConfigA'.
AssemblyDoc.Extension.SelectByID2("Part1", "COMPONENT", 0, 0, 0, false, 0, null, 0); AssemblyDoc.SetSuppression2("[1]", [2]);
swResolved instead of swSuppressed.The first argument to SetSuppression2 is the configuration name ('ConfigA'), and the second is the suppression state constant (swSuppressed) to suppress the component.
Fill all three blanks to create a new configuration 'ConfigX', set it active, and suppress a component 'PartX' in it.
AssemblyDoc.AddConfiguration2("[1]", "", ""); AssemblyDoc.ShowConfiguration2("[2]", true); AssemblyDoc.Extension.SelectByID2("PartX", "COMPONENT", 0, 0, 0, false, 0, null, 0); AssemblyDoc.SetSuppression2("[3]", swSuppressed);
First, create the configuration 'ConfigX' (blank 1). Then activate 'ConfigY' (blank 2) - this is a trick to test attention. Finally, suppress 'PartX' in 'ConfigX' (blank 3). The correct sequence is to create 'ConfigX', activate 'ConfigY', and suppress in 'ConfigX'.
