discontinuedPackage jet_cad_floor_plan has been discontinued and replaced by jet_cad_2d_plan.

isSymbolInstance function

bool isSymbolInstance(
  1. DraftDocument doc,
  2. Handle handle
)

handle is a root-level instance whose definition carries a SymbolComponent (D7's rule, F-11's for a symbol).

Implementation

bool isSymbolInstance(DraftDocument doc, Handle handle) {
  final node = doc.tree[handle];
  return node is InstanceNode &&
      node.parent == doc.rootHandle &&
      doc.tree.definition(node.definition) != null &&
      doc.components.get<SymbolComponent>(node.definition) != null;
}