Visio Guy

Visio Discussions => General Visio => Topic started by: craftyness on May 04, 2020, 02:12:34 PM

Title: Creating an animated logic diagram
Post by: craftyness on May 04, 2020, 02:12:34 PM
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!
Title: Re: Creating an animated logic diagram
Post by: wapperdude on May 04, 2020, 03:54:56 PM
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.
Title: Re: Creating an animated logic diagram
Post by: Hey Ken on May 05, 2020, 02:32:44 PM
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 (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

Title: Re: Creating an animated logic diagram
Post by: wapperdude on May 05, 2020, 02:47:36 PM
@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.
Title: Re: Creating an animated logic diagram
Post by: metuemre on May 07, 2020, 12:23:19 PM
Check this post as well, it may be helpful

http://visguy.com/vgforum/index.php?topic=8963.msg39727#msg39727 (http://visguy.com/vgforum/index.php?topic=8963.msg39727#msg39727)
Title: Re: Creating an animated logic diagram
Post by: vojo on May 07, 2020, 01:21:35 PM
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.