Sparkette Posted March 26, 2019 Report Share Posted March 26, 2019 (edited) https://gfycat.com/formalgentlelemming Not this particular use of it of course, but just in general. Sorry the cursor isn't there; you can still easily see what's going on though. EDIT: I rewrote this as a shortcut menu plugin that just opens a regular block diagram window: Here's the old version in case anyone wants to play around with the External Editor Wizard stuff, or my subpanel diagram code: Old AHS Editor.zip Edited March 30, 2019 by flarn2006 1 Quote Link to comment
bbean Posted March 26, 2019 Report Share Posted March 26, 2019 Yeah I could see that being helpful at some point. What happens when you have more than one primitive/Subvi on the diagram in the node? Does it just place another entry at the bottom of the unbundle? Quote Link to comment
hooovahh Posted March 26, 2019 Report Share Posted March 26, 2019 Yeah this is neat and useful...how much of this black magic is built into LabVIEW and how much did you develop? Quote Link to comment
0_o Posted March 26, 2019 Report Share Posted March 26, 2019 Next to your custom.vi there was statediagram.vi Is it the source code to NI's Automation and syncing of state machines? I would love to customize their tool and create automation for my own flavor of a state machine that will keep in sync with a UML diagram. It was tried in other languages and failed but for basic usage, it could be nice Quote Link to comment
Sparkette Posted March 26, 2019 Author Report Share Posted March 26, 2019 (edited) Yeah I could see that being helpful at some point. What happens when you have more than one primitive/Subvi on the diagram in the node? Does it just place another entry at the bottom of the unbundle? Yep. Yeah this is neat and useful...how much of this black magic is built into LabVIEW and how much did you develop? What do you mean specifically? Next to your custom.vi there was statediagram.vi Is it the source code to NI's Automation and syncing of state machines? I would love to customize their tool and create automation for my own flavor of a state machine that will keep in sync with a UML diagram. It was tried in other languages and failed but for basic usage, it could be nice Very observant! This is making use of an obscure, probably unsupported feature in LabVIEW called an "External Editor Wizard". The only official one that exists to my knowledge is the State Diagram Editor, which works similar to the Statechart Module (which, incidentally, is what the functions supporting the editable embedded diagram were built for) but it has fewer features and is available for free. The way External Editor Wizards work is you place one from the palette, and draw a box like with a structure. Then a VI generates some stuff with scripting, and it opens an editor to manipulate the code. You could call it a type of "Express Structure"—it works like an Express VI, with how you can configure it, except it exists as multiple objects in a structure on a block diagram, instead of as a single node. From what I can tell, the structure can be of any type, except a Flat Sequence Structure, as for some reason that doesn't descend from the Structure class. (I'm using a stacked sequence here, as with only one frame it looks and acts identically.) It appears that this feature was never intended to be used for anything other than the State Diagram Editor, as if I right-click the structure and select Properties, it tells me I can't edit the properties because the structure was created by the State Diagram Editor. As it happens, I think I actually thought of a better way to get this same functionality, that doesn't even rely on anything unsupported. So I'm probably just going to do that. I'll still release this (incomplete) version when I get home from work though, just so you all can see how it works. Edited March 26, 2019 by flarn2006 Quote Link to comment
0_o Posted March 27, 2019 Report Share Posted March 27, 2019 I played a bit with the free tool and you found how it was written. Did you find the source code of that free tool? I would like to try and build on that automation and wrap my own flavor of state machine into it without writing everything from scratch Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.