Std LinkMake

Description
creates an App Link ( class), a type of object that references or links to another object, in the same document, or in another document. It is especially designed to efficiently duplicate a single object multiple times, which helps with the creation of complex assemblies from smaller subassemblies, and from multiple reusable components like screws, nuts, and similar fasteners.

The App Link object was newly introduced in v0.19; in the past, simple duplication of objects could be achieved with, but this is a less efficient solution due to its implementation which essentially creates a copy of the internal Shape of the source object. On the other hand, a Link references directly the original Shape, so it is more memory efficient.

By itself the Link object can behave like an array, duplicating its base object many times; this can be done by setting its property to  or larger. This "Link array" object can also be created with the different array tools of the Draft Workbench, for example,, , and.

When used with the PartDesign Workbench, Links are intended to be used with full ; to create arrays of features, use, , and.

The tool is not defined by a particular workbench, but by the base system, thus it is found in the  that is available in all workbenches. The Link object, used in conjunction with to group various objects, forms the basis of the  Assembly3 and  Assembly4 Workbenches.

Usage
With selection:
 * 1) Select an object in the tree view or 3D view for which you wish to create a Link.
 * 2) Press the  button. The produced object has the same icon as the original object, but has an arrow overlay indicating it is a Link.

Without selection:
 * 1) If no object is selected, press the  button to create an empty Link.svg Link.
 * 2) Go to the property editor, then click on the  property to open the Link selection dialog to choose an object, then press.
 * 3) Instead of choosing an entire object in the tree view, you can also pick subelements (vertices, edges, or faces) of a single object in the 3D view. In this case, the Link will duplicate only these subelements, and the arrow overlay will be different.

Properties
An App Link ( class) is derived from the basic App DocumentObject ( class), therefore it has the latter's basic properties like and.

The following are the specific properties available in the property editor. Hidden properties can be shown by using the command in the context menu of the property editor.

Data

 * : it indicates the source object of the App Link; this can be an entire object, or a subelement of it (vertex, edge, or face).
 * : it defaults to, in which case the Link will override the 's own placement. If it is set to , the Link will be placed in the same position as the.
 * : the placement of the Link.
 * This property will change to if  is set to ; in this case, the  constitutes an offset applied on top of the  of the.


 * : it defaults to, in which case the tree view will show the individual Link copies, as long as is  or larger.
 * : it defaults to . If it is or larger, the App Link will behave like an array, and will duplicate the same  many times. If  is, each element in the array will be displayed in the tree view, and each can have its own  modified. Each Link copy will have a name based on the Link's Name, augmented by , where  is a number starting from . For example, with a single , the copies will be named , , , etc.
 * : name of the execute function that will run for this particular Link object. It defaults to . Set it to to disable it.
 * : it defaults to . It is a factor for uniform scaling in each direction, , and . For example, a cube of x  x , that is scaled by , will result in a shape with dimensions  x  x.
 * : the scale factor for each Link element.

Hidden Data properties

 * : list of Link elements that have had their color overriden.
 * : the scale factor for each component for all Link elements when  is  or larger. If  is other than, this same value will be used in the three components.
 * : the visibility state of each Link element, either  or.
 * : the placement for each Link element.
 * : the list of Link elements.

The App Link object will additionally show the properties of the original, so the property editor may have groups of properties like , , , , etc.

View

 * : it defaults to ; it can be, , ,.
 * : it defaults to ; if set to it will override the 's material.
 * : this property includes sub-properties that describe the, , , , , and.
 * : this property includes sub-properties that describe the, , , , , and.
 * : this property includes sub-properties that describe the, , , , , and.
 * : this property includes sub-properties that describe the, , , , , and.




 * : or.

It will additionally show the view properties of the original.

Information

 * PR#2559: expose link and navigation actions, an introduction to the Link feature.