Page 1 of 1
					
				Macros Map
				Posted: Wed Aug 14, 2024 12:15 am
				by Alan_37
				HI, 
My project got so big that I am struggling to remember the Map 
and where all the Macros are.
I know I can go to Main and follow from there but
it would be great to have a Map of all Macros on one page maybe in the Project Explorer.
Regards
			 
			
					
				Re: Macros Map
				Posted: Tue Aug 20, 2024 10:09 pm
				by Alan_37
				Hi 
So is this something possible?
			 
			
					
				Re: Macros Map
				Posted: Wed Aug 21, 2024 10:27 am
				by Steve-Matrix
				It is possible, but not easy to get something that automatically creates a useful visual layout.  I've put it on our list of proposed features and will have a think and see if there is anything we can do.
As an alternative, there may be some 3rd party tools that could help you now. For example, I've used a tool in the past called "Cpp Depends" which can generate graphical maps of macros/functions.  Here's an example of it run on C code generated by a sample Flowcode project (also attached).  The project is very simple - the "main" and 3 "FCM_" are the user macros - but the analysis can be complex as it shows all the component macros too.  The map for a bigger project will be a lot more complex than this!
			
		
				
			 
- Flowcode C code  Analysis.png (173.91 KiB) Viewed 9750 times
 
There are other tools that can do a similar thing.
 
			
					
				Re: Macros Map
				Posted: Wed Aug 21, 2024 2:02 pm
				by Alan_37
				Hi Steve, 
Thanks for your reply,  
I understand, It doesn’t have to be complex  just a Map to help visualize 
the project structure, a flowchart of all macros 
With names on 1 page. 
I think the function list occurrences may help a bit in developing this feature.
Thanks again
			 
			
					
				Re: Macros Map
				Posted: Wed Aug 21, 2024 9:40 pm
				by kersing
				 just a flowchart of all macros
How would you handle recursive calls or even more complex: macro A calling macro B which calls macro A etc etc?
 
			
					
				Re: Macros Map
				Posted: Wed Aug 21, 2024 11:03 pm
				by Alan_37
				Hi Kersing,
Yes, I understand it's easier said than done, but I trust the team can accomplish this.
In my experience, when developing something I always start 
by throwing in something very simple and then continuing to refine 
from there. 
What I mean by that as an example: Main --> expand --> Macro A, B, C, expand B find macro D, and so on 
like browsing a folder tree, it's ok if it does not show every detail, there are updates for that 

 
			
					
				Re: Macros Map
				Posted: Tue Aug 27, 2024 4:18 pm
				by Steve-Matrix
				I've created a quick web page that might achieve what you want:
  https://www.flowcode.co.uk/FlowchartView/macro-map.php
Note that it does not currently identify macros that are properties of components. (edit: this means it is not yet suitable for Web Developer apps).
I've done only a bit of testing, so please let me know if there are any problems or you work like to see additional features.
 
			
					
				Re: Macros Map
				Posted: Mon Sep 02, 2024 11:36 pm
				by Alan_37
				Hi Steve,
Thank you for taking the time to address this. I've tested it with both small and large flowcode files, and I think it's a very promising start.
With the smaller flowcode files, I can generally follow and understand what's happening. However, when working with larger files,
the map with over 3000 lines becomes overwhelming and impossible to understand.
Here are some suggestions to improve usability.
> Showing an Expanded map of all macros at once is overwhelming and difficult to understand instead, an expandable tree of macros would 
allow users to expand and follow one path at a time.
> Using indentation does not clearly show the macro location, a more graphical expandable tree would solve that.
> Some macros are not important to the map, an exclude from Map would solve that.
I think the final product should look something like Regedit in Windows.
Thanks again for your efforts.
Best regards,
Alan