Copying Constants, Variables and User Macros between charts

Please add any feature requests for Flowcode version 7 here

Moderator: Benj

Post Reply
triokenwood
Posts: 31
Joined: Tue May 04, 2010 8:05 pm
Has thanked: 5 times
Been thanked: 10 times
Contact:

Copying Constants, Variables and User Macros between charts

Post 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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Copying Constants, Variables and User Macros between cha

Post 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.

triokenwood
Posts: 31
Joined: Tue May 04, 2010 8:05 pm
Has thanked: 5 times
Been thanked: 10 times
Contact:

Re: Copying Constants, Variables and User Macros between cha

Post 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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Copying Constants, Variables and User Macros between cha

Post 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.

Post Reply