Consulting

Results 1 to 2 of 2

Thread: Solved: KeyStrokes in SolidEdge 2D from Outlook or other Office Macro

  1. #1
    VBAX Regular
    Joined
    May 2007
    Posts
    87
    Location

    Solved: KeyStrokes in SolidEdge 2D from Outlook or other Office Macro

    Dear all,

    Thanks for selecting my thread.

    I've automated ProE (Engineering Solid Modelling Program) using a macro from MS Outlook which is triggered when the email with a code word is delivered.

    However, I'm looking to apply the principle to a new package:
    SolidEdge free 2D.

    Background: Cad companies are at war with each other trying to get more users to convert from one package to another, and it's a pretty open battle at the moment, but one of the dark horses: UGS SolidEdge (which is quite a powerful package but very under-marketed) has a new weapon, FREE 2D cad that is parametrically driven.

    It can be downloaded for free, I won't put the link here because everyone will think I'm working for them, which I'm not.

    Real downside is that I can't control it in the same way that I'm controlling ProE because the free download doesn't have Macro/Trail file/keystroke file control.

    I can open it though, with the file I want open, from a batch file or from an office macro.

    What I want, is a way of getting outlook to send a message of "<ctrl><p>" (pause) "<return>" to the software window once open.

    I realise that it is possible to do something similar with a TSR like "Click OK", but wnat to use a macro if possibly, to minimise the number of applications running on my PC.

    IS IT POSSIBLE TO SEND A KEYSTROKE COMMAND TO AN OPEN WINDOW IN A THIRD PARTY APPLICATION FROM AN OFFICE MACRO?



    Cheers,

    -AS

  2. #2
    VBAX Regular
    Joined
    May 2007
    Posts
    87
    Location
    I'm actually solving this in Excel now, but the format might be useful here, so I've posted this before closing down this thread.

    [VBA]
    Sub SE2D()
    Shell "C:\SE2D\Program\Edge.exe C:\PE3\AR\DOOR_001.dft", vbMaximizedFocus
    Application.Wait Now() + TimeSerial(0, 0, 10)
    Application.SendKeys "^p", True
    Application.SendKeys "~", True
    Application.SendKeys "~", True
    End Sub
    [/VBA]

    If you need other more specialised keys, curly brackets seem to be the way forward.

    {up} for up arrow
    {down} for down arrow
    {tab} for tab
    {f4} for f4
    SendKeys "^p", <ctrl><p>

    ETC.
    etc.

    Cheers,
    -AS

Posting Permissions

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