// Footprint node and Model node ID
const footprintID = "<FOOTPRINT NODE ID HERE>";
const modelID = "<MODEL NODE ID HERE>";
// Declare specific footprint and model node based on their ID as a PcbLayoutNode
const footprintNode = flux.getNodeById(footprintID) as PcbLayoutNode;
const modelNode = flux.getNodeById(modelID) as PcbLayoutNode;
// This will sort and return an array of all available assets in the project with file type .kicad_mod
const footprintAssetNotSorted = flux.assets.filter((asset) => asset.fileType === "kicad_mod").map((asset) => asset.name);
const footprintAssetId = footprintAssetNotSorted.sort();
// This will sort and return an array of all available assets in the project with file type .step
const modelAssetIdNotSorted = flux.assets.filter((asset) => asset.fileType === "step").map((asset) => asset.name);
const modelAssetId = modelAssetIdNotSorted.sort();
// This checks if footprint and model node has Asset rule
if (footprintNode || modelNode) {
const assetFootprintRule = footprintNode.rules.find((rule) => rule.key === "asset");
const assetModelRule = modelNode.rules.find((rule) => rule.key === "asset");