+ Reply to Thread
Results 1 to 2 of 2

Thread: Shapes and Groups and VBA Functions to modify

  1. #1
    Registered User
    Join Date
    07-24-2011
    Location
    Vancouver , BC
    MS-Off Ver
    Excel 2007
    Posts
    2

    Shapes and Groups and VBA Functions to modify

    Hi All..Keep in mind my level of VBA is beginner.

    Im in a project to create a moch-up of an engine's rotating assemblies.

    So I have a piston created of a group of shapes.. ( call it Five shapes )
    SHAPE#1 A BASIC RECTANGLE ( 2d view of a piston )
    SHAPE#2 A BASIC LINE PARALLEL to the TOP
    SHAPE#3 A BASIC LINE PARALLEL to the Above
    SHAPE#4 A FINAL LINE PARALLEL to the Above
    SHAPE#5 A CIRCLE BELOW the LINES in the MIDDLE of the RECTANGLE
    ** GROUP THESE as ("GROUP1") **

    and I have a CrankShaft which has another five shapes..

    The piston must move diagnally
    The Crank is rotated in degrees.

    Function cranktiming(Name As String, Angle)
    
    ActiveSheet.Shapes(Name).Select
    
    Selection.ShapeRange.Rotation = Angle
    
    End Function
    Executed from a Cell using Formula
     =cranktiming("group2",A1)
    Even though I group shapes together, can I take a reference of one shape inside the group, and tie this to another shape inside another group, and have a resulting factor, Change the positions ? the connecting rod would be a static size. It would be tracking between the moving groups.. and the piston would track its position from a formula of the crank degree..\

    Does that sound interesting ? Who would like to help out here with ideas..

  2. #2
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2007, 2010
    Posts
    25,777

    Re: Shapes and Groups and VBA Functions to modify

    Welcome to the forum.

    I think you're going to need write formulas that articulate each piece as a function of crank angle.

    There's an impressive engine animation at www.angellabsllc.com/video/animation.xls
    Microsoft MVP - Excel
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.2.0