Page 1 of 1

Copying Constants, Variables and User Macros between charts

Posted: Wed Aug 03, 2016 12:06 pm
by triokenwood
Maybe there is already a simple way to do this - in which case, can someone please explain 'how'!

If not, it would be really useful to be able to copy (multiple) Constants, Variables or User Macro definitions from one flowchart to another - not just their names, but also their default values and descriptive text.

Cheers,
Bill

Re: Copying Constants, Variables and User Macros between cha

Posted: Wed Aug 03, 2016 12:41 pm
by Benj
Hi Bill,

I would normally do this one of two ways.

1) Copy the Flowcode project and delete or edit the bits I don't need.

2) Open the Flowcode project in an text editor and copy the parts of the XML code I need.

However a nice way to do this using the application would be ideal so I'll get it on the list.

Re: Copying Constants, Variables and User Macros between cha

Posted: Wed Aug 03, 2016 2:14 pm
by triokenwood
Hi Benj,

I have effectively done what you suggested - paring down, resaving, then building up again.

However, this particular approach is exactly what I am trying to avoid as I am concerned that I have an, as yet, unidentified bug in the code that is completely stopping the code from working 'on-chip' (despite it running happily enough in the simulator).

Instead, I went for a 'clean start' - getting code to work in stages, adding bits as I went along, testing all the time. Now I have a functional 'skeleton' around which I wanted to drape the 'muscles' of my full routine, one limb at a time, testing as I went.

Straight away, I realised I couldn't just copy and paste the flowchart blocks - because variables, etc., were 'missing'.

I looked into copying at the XML level, but fely that this wouldn't necessarily be the best way forward as it could perhaps introduce as many issues as I was trying to resolve!

At least I am glad to know I hadn't missed any 'obvious' solution.

Looking forward to an update / upgrade in the future.

Cheers,
Bill

Re: Copying Constants, Variables and User Macros between cha

Posted: Wed Aug 03, 2016 2:43 pm
by Benj
Hi Bill,

If you export and import macros then the globals variables and constants should also come along with the macros.
I looked into copying at the XML level, but fely that this wouldn't necessarily be the best way forward as it could perhaps introduce as many issues as I was trying to resolve!
Yes XML editing by hand is very easy to get wrong. I can appreciate this fully.