 
					
				
		
 tbd
		
			tbd
		
		
		
		
		
		
		
		
	
			04-12-2010 01:32 PM
Greetings,
Does anybody have an idea of to have diagram-text updateable via a typedef - so that updating the typedef changes the text seen by programmers?.
I've tried using a string with a default-text value, but it doesn't work well for me. With string-typedef, at best, constant-text initially appears in the diagram-constant but text doesn't update with changes to typedef. At worst, no text appears in constant on the diagram.
LV 2009
Thanks/Cheers!
Solved! Go to Solution.
 jcarmody
		
			jcarmody
		
		
		
		
		
		
		
		
	
			04-12-2010 02:25 PM - edited 04-12-2010 02:26 PM
 jcarmody
		
			jcarmody
		
		
		
		
		
		
		
		
	
			04-12-2010 02:42 PM
04-12-2010 03:33 PM
Hi Jim,
Thanks for the utility! I like the simplicity of running it from the tools menu - though it implies any LV installation needs this tool to do the maintenance(?)
May be the best solution anyway.
Thanks/Cheers!
 jcarmody
		
			jcarmody
		
		
		
		
		
		
		
		
	
			04-12-2010 07:24 PM
04-12-2010 10:11 PM
Just scratching the surface re: scripting. Built a utility to create FP cluster typedefs from a database, still fine-tuning the results/cosmetics.
Hey, on the OP subject, I got close to the optimal/simple solution by embedding text in an enumerated type. Though each enumeration is limited to about 256 chars, that's plenty enough for a line of text. So my 12 lines of comments became 12 enumerations, and the typedef is an array of this enum. Editing the typedef causes diagram array-constants to return to displaying a default of one value, but that's OK. The important thing is to have accurate information available locally (on the diagram) and the constant can be expanded and saved by anyone editing a diagram after a typedef change.
Thanks/Cheers!
 
					
				
		
 tst
		
			tst
		
		
		 
		
		
		
		
		
	
			04-13-2010 01:44 AM
The enum array is one way you can do this. Another is a modification of Jim's example - you can open a reference to the typedef VIs, get its callers property (which will return all VIs which call it), then open a reference to each of those VIs and use the traverse VI from vi.lib\utility to traverse the diagram for string constants, and for each constant check its typedef property to see if its your typedef. If it is, you can modify it.
This will handle all VIs currently in memory, but it takes time and won't handle VIs not in memory, so I wouldn't recommend it.