I’ve tried using “replacement,” but it hasn’t worked for me. Can someone tell me what I’m doing wrong? In a project, I’d like to replace a ST7735S display with an ILI9341 display. Tried this: Added an ILI9341 display to the 2D screen, deleted it again > right-click on the ST7735 display > click on “replace” > I can see the ILI9341 display appear > select it and press OK. I can see that something happens, but it’s still the ST7735 display on the 2D screen. Have I forgotten something?
Thank´s in advance
Jorgen
Attachments
Så sker dette.png (51.28 KiB) Viewed 131 times
Klikker på det nye display.png (46.54 KiB) Viewed 131 times
Først hente nyt display.png (64.1 KiB) Viewed 131 times
Replacing a component and keeping the Handle name correct
Hi Jorgen.
When you replace a component in Flowcode, the Handle (name) of the original component is retained by default — even though the underlying Type has changed. This can be confusing, since the component will still show its old name on the 2D panel, even though it's now a different component.
To make the Handle reflect the new (replacement) component properly, follow these steps:
Add the component you want as the replacement.
In Properties, select the replacement component's name so it's highlighted, then right-click → Copy.
Delete the newly added replacement component.
Select the original component on the 2D panel, right-click → Replace, choose the replacement component, then click OK.
In Properties, select the Handle/name field of the now-replaced component so it's highlighted, then right-click → Paste, to overwrite it with the name you copied in step 2.
Save - Reload the project, or change any property to a new value and back to its original value, for the correct name to display on the component.
The Type field in Properties always shows the actual underlying component, so you can use that to confirm what a component really is if you're ever unsure.
Note: the component Handle can be set to any name you like — it doesn't have to match the component type.
I thought it was simply a matter of doing the “Replace” and that would be it. I didn’t realise that you also need to copy the new Handle into the replaced component, and that this was something Flowcode apparently doesn’t do automatically, (my thought of bug).
So, once again, you’ve taught me something new. Many thanks for your help and patience!