02-03-2012 10:17 AM
I have a LARGE state machine that uses a producer consumer configuration. I need to do some "paper" documentation. Is there a simple way to export or otherwise get a list of the states in the case statement so I can stuff them into Word and expound on what each does?
I guess I can write a code snippet that takes the case and converts it to an array of strings and then display them, highlight, copy and paste, but I was hoping not to have to modify my code.
02-03-2012 10:34 AM
If you turn on scripting you can use a property node property to list the cases. I list the cases if you open the code attached in this thread
02-03-2012 10:37 AM
What is the case selector datatype? If it is an enum you could do this
02-03-2012 11:09 AM
I ended up taking the enum for the case and converting it to a string array, then writing it out to a text file using a write spreadsheet VI, but that is not what I had hoped for. That meant that I had to modify the code. Due to controls on the source, I ended up having to copy the code somewhere else and do the mods. I was just hoping there was a project related dropdown equivelent.
02-03-2012 11:42 AM
Do you know that you can print VIs or projects to an html file? It is highly configurable on what to include in the report. The case structure names are not listed as text but are part of the images so parsing is out of the question. But maybe the report will give you a good starting point for your "paper" documentation.
02-03-2012 11:51 AM
IF the enum is a type def then you can write external code (so your traget code in unchaged) to open the type def get a ref to the enum and then list its strings.
Put a stirng on the FP to select diffeent type-defs and you have a re-uable tool that does NOT change your code.
Ben