Creating an animated logic diagram

Started by craftyness, May 04, 2020, 02:12:34 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

craftyness

What is the best method to create an interactive logic diagram?  The basic idea is to have two inputs to an AND gate.  Double clicking the Input should turn that input "On" (and change the border color).  The connecting line should inherit that state.  The AND gate would then evaluate the inputs.  Since only one input is on, nothing happens.  Once the other input is double clicked to "ON", then the AND gate should turn "ON" his output connector (and change the connector line color).

Changing the line color would allow logic flow for the user.

Is there a modular way to build this?  Such that once I have an "AND" gate, I can just copy and paste it and have the functionality I need?

Thanks in advance for your help!

wapperdude

My thoughts...The logic gate phase of this could be done in shapesheet.  Pushing the logic state thru the connectors to the next gate requires code.

LOGIC GATE:  construction would have to be a grouped shape since inputs need to react independently.  Thus the group would have separate subs shapes, one for each input and finally a sub shape for body and output.  Dbl clicking could be employed, but may be problematical.  Using right click, action menu might be better means of selecting each input state. 

CONNECTIVITY:  this info is contained within the connector.  Finding who's connected to whom requires code.  Triggering the code to run automatically is a problem as you'd only want specific event to trigger such.

Bottom line, yes can be done, but requires bit of effort upfront.  Each logic cell would be drag and drop once created.  Code is one-time development.  After that, fun time.
Visio 2019 Pro

Hey Ken

Craftyness:

   Several years ago I wrote some VBA that would actually run electronic circuits.  It's here on the forum at http://visguy.com/vgforum/index.php?topic=6969.msg29130#msg29130.  While it only does wires, bulbs, relays, and the like, at least it works.  Might give you an idea how to proceed.


Wapperdude:

   A grouped shape?  Nah; why bother with subshapes and all?  A few Geometry sections in a single shape would do nicely, with adding/removing inputs done via right click actions.

   Regardless, to bring it to life you'd have to have some VBA to be able to follow connections from gate to gate.  But at least it can be done.

   - Ken

Ken V. Krawchuk
Author
No Dogs on Mars - A Starship Story
http://astarshipstory.com

wapperdude

@Hey Ken:  I disagree.  As I understand it, the OP wants to change colors of partial elements of the shape.  You cannot do that with multiple geometry sections.  Every line will receive same color, width, etc.  Adding/removing pieces wasn't the goal.
For this case, grouped shape IS necessary.

BTW:  I was thinking about your schematic post, but couldn't remember what or whom.  It's a nice example.  Glad you saw this post.
Visio 2019 Pro


vojo

yes...if you want parts of some "shape" to have different colors, then got to go with groups.  single shape = single color.
BTW, can do show/hide at the geometry or group levels.