+ Reply to Thread
Results 1 to 2 of 2

Creating Hydraulic Schematics in Excel?

  1. #1
    Registered User
    Join Date
    01-05-2010
    Location
    Louisiana
    MS-Off Ver
    Excel 2003
    Posts
    3

    Creating Hydraulic Schematics in Excel?

    I am looking to develop hydraulic system schematics in Excel. Im not looking for exactly how to do this, but rather different ideas to accomplish the end goal.

    I created a basic sketch of what I want to achieve in the program, although the method of creating the design is flexible (fill in cells, using drawing symboles, etc).

    In the diagram below we have 4 inputs/outs: AAAA, BBBB, CCCC, DDDD

    The numbers in the hexagons are links (02 from AAAA links to 02 into V1)

    There are 5 valves (V1, V2,...V5)

    I want to designate which valves are closed and which are open, then see the fluid path based on this criteria.

    In the attached image, we are putting pressure into the system at BBBB. It then enters through valve 3 (V3) and passes through the OPEN V2. All other valves are closed, so the green paths beyond those valves are where we check for leakage. So in this diagram we are testing that V1, V4, and V5 are completely sealed.

    Red path is under pressure, and green path is not under pressure.

    The next step would be to change which valve is being tested, and the pressure paths should change colors dynamically.

    This may be too ambitious of a project to do in Excel, but I would like to know if it could be done (reasonably). The end product should be somewhat reasonably edited for different configurations and products.

    lBTDipV.png

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Creating Hydraulic Schematics in Excel?

    Hi jbass350z,

    What you want can be done using VBA (Visual Basic for Applications). Each item you drew is known as a SHAPE in Excel. Shapes can be renamed from the generic name that Excel assigns, to something meaningful to you, such as V1. You can set up a logic table to indicate which shapes you want to modify (change color, make visible, hide, etc).

    See the attached sample file which changes colors of 3 simple shapes. I suggest you download the file and click the rectangles on the top row.

    The VBA code that does that is:
    Please Login or Register  to view this content.
    From your question, I assume you are not familiar with VBA, so here a a couple of tips to help you get started.

    To access Visual Basic (VBA) see:
    http://www.ablebits.com/office-addin...a-macro-excel/
    a. Click on any cell in the Excel Spreadsheet (may not be needed).
    b. ALT-F11 to get to VBA.
    c. CTRL-R to get project explorer (if it isn't already showing).
    d. Double Click on a 'Module Name' in 'Project Explorer' to see code for that module.

    Debugger Secrets:
    a. Press 'F8' to single step (goes into subroutines and functions).
    b. Press SHIFT 'F8' to single step OVER subroutines and functions.
    c. Press CTRL 'F8' to stop at the line where the cursor is.
    d. 'Left Click' the margin to the left of a line to set (or clear) a BREAKPOINT.
    e. Press CTRL 'G' to open the IMMEDIATE WINDOW. 'debug.print' statements send their
    output to the IMMEDIATE WINDOW.
    f. Select View > Locals to see all variables while debugging.
    g. To automatically set a BREAKPOINT at a certain location put in the line:
    'Debug.Assert False'
    h. To conditionally set a BREAKPOINT at a certain location put in lines similar to:
    if i >= 20 and xTV20 > 99.56 then
    Debug.Assert False
    endif
    i. A variable value will be displayed by putting the cursor over the variable name.

    Lewis
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Help Creating a n1.85 Hydraulic Graph in Excel
    By 2sBlind in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 06-25-2014, 04:00 PM
  2. PLEASE HELP ME EXCEL GURUS !!!Creating yearly intervals in excel 2007
    By michaelbanks in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-25-2014, 07:22 AM
  3. Copy complete worksheet to new excel by creating new excel
    By aakhan2011 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-20-2014, 10:43 AM
  4. Replies: 2
    Last Post: 11-23-2010, 09:42 PM
  5. Replies: 3
    Last Post: 03-25-2010, 10:20 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1