SolidWorks 2011 Assemblies Bible - Matt Lombard [84]
After you click the New Part command, SolidWorks adds the new part to the FeatureManager of the new assembly. Note the default naming shown in Figure 10.1. Also, note the cursor with the green check mark on it. This check mark is telling you (in conjunction with the text in the message bar at the bottom of the screen) that you need to select a plane or planar face to place the Front (or first, or XY) plane on the Front plane of the assembly. Remember that every template may have the standard planes renamed to anything you choose, so the first standard plane may not be called the Front plane.
FIGURE 10.1
Inserting a new blank part into a new assembly
When you click the cursor with the green check mark on a plane or planar face, the Front plane of the part becomes fixed to the Front plane of the assembly, with the Origins of the two files aligned, and SolidWorks automatically opens a new sketch on the Front plane of the part. The part name also turns blue. This color means that you are editing the part in the context of the assembly. Whatever you do in this state changes the part document rather than the assembly document. A new sketch, for example, will be added to the part rather than the assembly.
Introducing virtual components
The part you have just added to the new assembly is called a virtual component. It is called “virtual” because the part is not saved yet; it is still just inside the assembly. This is the reason why the name appears as shown in Figure 10.1. When you save the part to an external file, it loses the part of the name that is associated with the current assembly. The “components” part of the name means that both parts and subassemblies can be virtual, or exist only within the top-level assembly. You will find more information on virtual components later in this chapter.
Creating the part geometry
Sketch a centered rectangle from the Origin, and give it dimensions of 4 inches (100mm) tall by 5 inches (125mm) wide. Extrude it 2 inches (50mm). You can find the Extrude command icon on the Assembly toolbar when editing a part in the context of the assembly.
Now exit the part. To do this, click the Edit Component icon in one of the places where it shows up on the screen. Figure 10.2 shows it in the Confirmation Corner in the upper-right corner of the graphics window. You can also find it on the Assembly toolbar.
FIGURE 10.2
Using the Confirmation Corner to exit Edit Component mode
Saving a virtual component
Next, right-click the name of the part you just added and select Save Part (in External File), as shown in Figure 10.3. Give the part the name Box (by slowly double-clicking the default name in the Save As dialog box that appears), and save it to your desktop (by clicking the Specify Path button in the Save As dialog box), or another place where it will be easy to find and delete later on. This part is just for practice in this chapter.
Notice that the name of the part in the assembly FeatureManager has changed, and the name is no longer surrounded by brackets or followed by the assembly name.
FIGURE 10.3
Saving the virtual components to an external file
Caution
SolidWorks Help says that virtual components are particularly useful with in-context modeling. This may be true, but there is more to the story. If you create parts in-context in an assembly that has not yet been saved, you may lose all of your references when you save the assembly. To be safe, it is a best practice to avoid creating in-context relations in an unsaved assembly.
If you haven't done it by now, you should save the assembly file. Give it the name Box Assembly, and save it to the same location where you saved the part earlier. If you get to the end after you make the in-context relations, and then save the assembly, your in-context features will go “out of context,” meaning