GuiCommand: Name: Std LinkMakeRelative MenuLocation: None Workbenches: All Version: 0.19 SeeAlso: Std_Part, Std_Group, Std_LinkMake
Std LinkMakeRelative
Description
creates an App Link (App::Link class), just like [ Std LinkMake, but it operates on selected subelements first, and sets the Link Transform to
True.
Usage
With selection:
- Select a subelement in the 3D view, this means a vertex, edge, or face, or any combination of these. These subelements must belong to a single object.
- Press the [
Make sub-link button. The produced object has the same icon as the original object, but has two arrow overlays indicating it is a relative Link.
Without selection:
- If no object is selected, this command does nothing.
- If an object is selected in the tree view only, but no subelement is selected in the 3D view, the command does nothing either.
<img alt="" src=https://raw.githubusercontent.com/FreeCAD/FreeCAD-documentation/master/wiki/images/Std_Link_tree_sublink_example.png )  method of the document. To define a relative link, its setLink method is used to pick the source object, and one or more of its subelements. Then the LinkTransform attribute is set to True.
import FreeCAD as App
doc = App.newDocument()
body = App.ActiveDocument.addObject("Part::Box", "Box")
obj = App.ActiveDocument.addObject("App::Link", "Link")
obj.setLink(body, '', ['Edge1', 'Edge6', 'Edge7', 'Edge10', 'Face2', 'Face3'])
obj.LinkTransform = True
obj.LinkPlacement.Base = App.Vector(20, 20, 0)
App.ActiveDocument.recompute()
{{Std Base navi}}
⏵ documentation index > Std LinkMakeRelative
This page is retrieved from https://github.com/FreeCAD/FreeCAD-documentation/blob/main/wiki/Std_LinkMakeRelative.md