Class MechanismSolidShare
Makes a copied mechanism display the SAME Solid instances as the mechanism it was copied from — the rule the authored equipment face applies when it materialises the runtime face, so the heavy machine-body geometry is built and held once.
public static class MechanismSolidShare
- Inheritance
-
MechanismSolidShare
- Inherited Members
Methods
Share(IGetAnchorToSolidDictionary, IGetAnchorToSolidDictionary)
Replaces every solid of dst's dictionary by the
source's instance hung on the matching anchor — matched by anchor
Guid first, then by anchor name (a chain seeded from chain code
rebuilds its anchors on every load, so its Guids are not persisted).
The copy's own, replaced solid has no other holder and is disposed;
the source's instances are never disposed here, the source keeps
their lifecycle. A matched destination anchor also takes the source
anchor's Guid, so identity-seeded display colors agree between the
two topologies. Source entries with no solid, and destination anchors
that already hold the very same instance, are left alone. Either
side being null, or having no dictionary, shares nothing.
public static int Share(IGetAnchorToSolidDictionary src, IGetAnchorToSolidDictionary dst)
Parameters
srcIGetAnchorToSolidDictionaryThe mechanism whose solids are to be shared; typically the authored face.
dstIGetAnchorToSolidDictionaryThe copy that will display them; typically the runtime face.
Returns
- int
How many destination entries now hold a source instance they did not hold before.