Skip to content

Tool SubstituteObject

DeepSOIC edited this page Apr 3, 2016 · 2 revisions

Description

Substitute Object tool is useful, when one needs to introduce modifications into the middle of a feature tree. It searches for links to an object ("old" object), and redirects all the links to another object ("new" object).

In the process, it looks, if redirecting a certain link would cause a circular dependency graph, and if so, the link is not redirected. Thanks to that, "new" object can depend on "old" object, and that dependency will not be broken by the tool.

How to use

Select the "old" object first, "new" object second, and invoke the command. If some links were not redirected for some reason, a message box will pop up, explaining that. After the tool is done, recompute the document manually (F5). It is advised that you review the new dependency graph before recomputing the document.

Limitations

Substitution is powered by ReplaceChild code from OpenSCAD workbench. So, it inherits its limitations.

SubstituteObject can't subsubstitute some kinds of links:

  • links to subelements. There is something good about it, as long as subelement links keep referring to elements by their indexes: replacing an underlying object will likely cause breakage of these links.
  • links by expressions
  • (other links that are not listed in supported types, below)

Supported link types:

  • Single whole-object links (App::PropertyLink)
  • Lists of links to whole objects (App::PropertyLinkList)
Clone this wiki locally