Hi Mark
Hey nothing wrong with that.
You really arent far from VBA though, the following does the same thing in
VBA.
Public Sub hideplanes()
SendKeys "%V"
SendKeys "G"
SendKeys "{ENTER}"
End Sub
--
Kent Keller
"Mark A. Bystry" wrote in message
news:97E9C9C45885E1D3AE68A45623EEFFF8@in.WebX.maYIadrTaRb...
> i'm sure everyone will laugh at this one but i use vbscripting quite often
> because it's fairly easy and works with every program written for windows.
i
> have several scripts that do many things. rather than give them all away,
i
> thought maybe i'd give a sample and let everyone's imagination run... i
use
> this one to toggle my origin planes on and off. i know, baby stuff, but it
> might help the novice programmer.
>
> 'VBScript Send Keys for Inventor
>
> Set WshShell = WScript.CreateObject("WScript.Shell")
> If WshShell.AppActivate("Autodesk Inventor") then
>
> WshShell.SendKeys "%V"
> WshShell.SendKeys "G"
> WshShell.SendKeys "{ENTER}"
>
> Else
> wscript.quit
> End If
>
> those newbies unfamiliar with this, just copy the code to notepad, saveas
> "something.vbs", and place a shortcut on your taskbar for single-click
> execution while in inventor.
>
> Mark Bystry
> Engineer
> Ziggity Systems, Inc.
> mbystry@ziggity.com
>
>