const footprintNode = flux.getNodeById("3f660c1b-bc04-4fa0-ab02-1566354dd092.defaultFootprint") as PcbLayoutNode;
const modelNode = flux.getNodeById("8c7dca42-58af-4867-a610-0718de3c2077") as PcbLayoutNode;
// This will return array of all assets with file type .kicad_mod
const footprintAssetId = flux.assets
.filter((asset) => asset.fileType === "kicad_mod") // Filter by file type
.map((asset) => asset.name) // Extract the name
.sort(); // Sort the resulting names
// This will return array of all assets with file type .step
const modelAssetId = flux.assets
.filter((asset) => asset.fileType === "step") // Filter by file type
.map((asset) => asset.name) // Extract the name
.sort(); // Sort the resulting names
if (footprintNode || modelNode) {
const assetFootprintRule = footprintNode.rules.find((rule) => rule.key === "asset");
const assetModelRule = modelNode.rules.find((rule) => rule.key === "asset");
flux.on("setup", () => {
const property = flux.properties.find((prop) => prop.name === "Package");
if (property) {