In larger projects, there may be some design sources that are frequently used across several designs. To organize these sources, they may be separated into a library other than the main design library. To compile a specific source, one may do the following:
In GUI, the first step is to change the active library. You can do this by right clicking into the target library and clicking Set Active. In the same window, you can right click on the source file then click compile.
In you macro script, you can specify the output library in the ACOM/ALOG command using –work switch.