Summary
When using the EasyEDA bridge to update an existing schematic netport component, calling toAsync().setState_Net(newNet).done() did not update the net name to newNet. Instead, the net became an empty string ("") when read back with getState_Net().
Creating a new net port with sch_PrimitiveComponent.createNetPort('BI', newNet, x, y, rotation, mirror) works correctly and immediately returns the expected net name.
Environment
- Skill repository/version:
easyeda-api-skill v1.1.3
- Bridge:
scripts/bridge-server.mjs
- EasyEDA context: schematic page, existing
netport primitives
- Host OS: Windows
- Node.js: v24.14.1
Reproduction
- Open a schematic page containing an existing net port, for example one with net
RGB_DB2.
- Fetch that existing net port with
sch_PrimitiveComponent.get(id) or from sch_PrimitiveComponent.getAll().
- Try to update its net:
const port = await eda.sch_PrimitiveComponent.get('existing-netport-id');
const asyncPort = port.toAsync();
asyncPort.setState_Net('GPIO1_C5_d');
await asyncPort.done();
const check = await eda.sch_PrimitiveComponent.get('existing-netport-id');
return check.getState_Net();
Expected behavior
check.getState_Net() should return:
Actual behavior
check.getState_Net() returned an empty string:
In my test, multiple existing netport primitives with original net names such as RGB_DB2, RGB_DB3, etc. were changed to blank nets after attempting setState_Net(...).done().
Workaround
Deleting the original net port and recreating it at the same coordinates works:
await eda.sch_PrimitiveComponent.delete('existing-netport-id');
const created = await eda.sch_PrimitiveComponent.createNetPort(
'BI',
'GPIO1_C5_d',
x,
y,
rotation,
mirror
);
return created.getState_Net();
This returns the expected new net name.
Notes
The issue was observed while replacing RGB_* net labels with the corresponding GPIO* names from U1 pin descriptions. The replacement only became reliable after deleting and recreating the net ports.
Summary
When using the EasyEDA bridge to update an existing schematic
netportcomponent, callingtoAsync().setState_Net(newNet).done()did not update the net name tonewNet. Instead, the net became an empty string ("") when read back withgetState_Net().Creating a new net port with
sch_PrimitiveComponent.createNetPort('BI', newNet, x, y, rotation, mirror)works correctly and immediately returns the expected net name.Environment
easyeda-api-skillv1.1.3scripts/bridge-server.mjsnetportprimitivesReproduction
RGB_DB2.sch_PrimitiveComponent.get(id)or fromsch_PrimitiveComponent.getAll().Expected behavior
check.getState_Net()should return:Actual behavior
check.getState_Net()returned an empty string:In my test, multiple existing
netportprimitives with original net names such asRGB_DB2,RGB_DB3, etc. were changed to blank nets after attemptingsetState_Net(...).done().Workaround
Deleting the original net port and recreating it at the same coordinates works:
This returns the expected new net name.
Notes
The issue was observed while replacing
RGB_*net labels with the correspondingGPIO*names from U1 pin descriptions. The replacement only became reliable after deleting and recreating the net ports.