Author Topic: Animate circuit diagram  (Read 4972 times)

0 Members and 1 Guest are viewing this topic.

mb-ing

  • Jr. Member
  • **
  • Posts: 11
Animate circuit diagram
« on: January 10, 2016, 06:01:50 AM »
Hi everyone,

First of all, I have to say, that I am a newbie in terms of MS Visio.

Looking at my short experience with MS Visio (MS Visio 2013 Professional), I must point out, that Visio is a very powerfull tool for my individual applicaton.

I have a look on this forum since a couple of weeks and I learn much interesting things.
Thank you a lot for that.

My focus for using MS Visio is on generating circuit diagrams (For wiring our RF-Broadcast-Components, commercial usage).
These are schematically and almost very simple (Only a couple of switches, lamps, patch panels, DIP, connectors, etc. pp.).

So far I created all relevant shapes, stencils, containers, title block, drawing frame and same usefull macros (switch from A3<=>A4, turn layers on/ off, Autofill title block, Finish-Autorun, ...).
Furthermore, I generated customized toolbar and exported the UI-file.

Everything is almost perfect and I am able to distribute templates, UI-file and documentations to my colleagues.

But, the icing of the cake would be a trivial animation of this circuit diagram.

What I mean by that?

Let me give you an example (a very abstract example to keep company secrets, but applies to my application):

- 1 power source
- 1 switch
- 1 lamp

=> If I turn on the switch the lamp should illuminates

Unfortunately, my research has shown that the almighty Google only contains a few rare results for my issue.
Maybe I used the wrong search keywords (I am grateful for every snippet of advice).

I would be very happy if you can give me an advice for my demands.

Thank you in advance for your efforts and have a nice day.

With best regards
MB-Ing.

(Servus aus Bayern^^)

Yacine

  • Hero Member
  • *****
  • Posts: 2711
Re: Animate circuit diagram
« Reply #1 on: January 10, 2016, 08:26:20 AM »
Servus nach Bayern,
There are actually possibilities to animate drawings, but if you're a nube, this will be very difficult to explain and to implement.
Have a look at this Video, I uploaded to YouTube: https://www.youtube.com/watch?v=WpKFGgEjGPg
Not really sure about what should be the right solution for you.
Gruß,
Y.

PS: Setting up the animation for your simple example would be very easy, but you're probably looking for a generic tool, that can handle an "infinite" number of components. That's where it gets complicated.
« Last Edit: January 10, 2016, 08:29:48 AM by Yacine »
Yacine

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3829
  • Ideas Visio-lized into solutions
Re: Animate circuit diagram
« Reply #2 on: January 10, 2016, 10:39:24 AM »
Visio 2019 Pro

Hey Ken

  • Full Member
  • ***
  • Posts: 218
  • Just This Guy
    • The Pennsylvania Project, with Ken Krawchuk
Re: Animate circuit diagram
« Reply #3 on: January 10, 2016, 12:57:49 PM »

MB-ing:

   Hey, I built one of those, and it actually functions! 

   I love to tinker with electronics, and I've created many an odd device going back to my childhood.  A few years ago I was working on one particularly-complex relay-controlled circuit, and I wanted to see if the beast actually worked before I went through all the trouble of building it.  The result is the attached Visio.  It's not complete (no project ever is), but it handles what I needed at the time.  It currently supports:

   - Battery
      - Right-click to turn on/off
      - Turns red when powered on

   - Wire
      - Simple and complex geometry
      - Turns red if positively charged, blue if negative, black if floating

   - Toggle switch (xPDT)
      - Left-click to flip on or off
      - Right-click to add another pole, change caption, etc.

   - Light bulb
      - Turns yellow when powered on

   - Relay (xPDT)
      - Turns blue when powered on
      - Right-click to add another pole

   The way it works is to right-click on the page background and select the component you want to add.  (Those page options are automatically created whenever you create a new page.)  As you'll quickly find out, not all the components are supported yet.  If you need an unsupported one (complex wire, bulb, or battery), just go to the sample page and copy it.  I wouldn't recommend copying the supported components because they'll crash Visio if you do.

   The attached Visio has a sample circuit I designed when I was 13, a simple two-bit binary adder that's been a mainstay counter for innumerable projects of mine.  Turn it on, and every time you hit the Count switch, it adds one.  (The Count switch should be a momentary contact pushbutton, but I haven't designed one yet.)

   Of course it can occasionally crash (it's not complete, as I said), so I added a right-click page option to nudge the VBA events into restarting.  Yes, I know it's slow, but like the Waltzing Bear, it's not so important that the bear waltzes badly; it's more significant that the bear waltzes at all.  And yes, it yells at you if you connect plus directly to minus. 

   I find the whole thing fun to play with, but then I'm like that. 

   Enjoy!

   - Ken


Ken V. Krawchuk
'caster

The Pennsylvania Project
Radio Podcast

10 to 11 AM Saturdays on WWDB 860 AM in Philadelphia
7 to 8 AM Mondays on KUR 1670 AM in Kutztown
On demand at http://PennsylvaniaProject.com

mb-ing

  • Jr. Member
  • **
  • Posts: 11
Re: Animate circuit diagram
« Reply #4 on: January 12, 2016, 06:11:47 AM »
Hi everyone,

thank you so much for your fast and detailed replies.
Especially to Yacine, Wapperdude, and Ken.

I will check all proposals.

@Wapperdue:
Thank you for your links

@Yacine:
Awesome Video!
Which Add-In is implemented in your MS Visio?

@Ken:
Thank you very much for your great achievement.
At the current time I think this solution is comperable to my issue.

With the help of VBA I found out, that a shape knows its connectors, predecessors and successors.
I can Loop through the circuit and if the circuit is closed I trace the way by a temporary layer (e.g. red).
First I have to check what happens if there is a multiple junction with two or more successors.

Maybe this is One possible approach to achieve my result I desire.

So far so good :D

Thank you in advance for your efforts and have a nice day.

Best regards
MB-Ing.

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3829
  • Ideas Visio-lized into solutions
Re: Animate circuit diagram
« Reply #5 on: January 12, 2016, 10:27:16 AM »
This might be of some benefit...at least for looking at connections.  May give you some ideas.  http://visguy.com/vgforum/index.php?topic=6373.msg26266#msg26266

Wapperdude
Visio 2019 Pro

mb-ing

  • Jr. Member
  • **
  • Posts: 11
Re: Animate circuit diagram
« Reply #6 on: January 13, 2016, 03:57:28 AM »
@Wapperdude:
Awesome, thank you very much!!!

Sorry, I am not really familiar with programming VBA in Visio.

In Inventor (CAD) there is a function:
 Dim oObject As Object
    Set oObject = ThisApplication.CommandManager.Pick(kPartFeatureFi​lter, "Pick a feature")

Does Visio VBA supply something comperable, so the user can pick/ select a shape?

Thank you in advance for your efforts and have a nice day.

Best regards
MB-Ing.