Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

toggle for planes on and off...

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
320 Views, 4 Replies

toggle for planes on and off...

Anonymous
Not applicable
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
0 Likes

toggle for planes on and off...

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
4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: Anonymous

Anonymous
Not applicable
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
>
>
0 Likes

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
>
>
Message 3 of 5
Anonymous
in reply to: Anonymous

Anonymous
Not applicable
thanks for your input, kent. one advantage of the script over vba is that
you cannot make custom icons in inventor like you can autocad/mdt. one could
either put the script on the taskbar or if you have office installed you can
add it to the microsoft shortcut bar. the latter works really great in
inventor. if you minimize the the shortcut bar to the windows caption bar,
in this case inventor's caption bar, you are able to see your icons. kind of
a workaround for not being able to make your own icons and macros.
0 Likes

thanks for your input, kent. one advantage of the script over vba is that
you cannot make custom icons in inventor like you can autocad/mdt. one could
either put the script on the taskbar or if you have office installed you can
add it to the microsoft shortcut bar. the latter works really great in
inventor. if you minimize the the shortcut bar to the windows caption bar,
in this case inventor's caption bar, you are able to see your icons. kind of
a workaround for not being able to make your own icons and macros.
Message 4 of 5
Anonymous
in reply to: Anonymous

Anonymous
Not applicable
Good points.

Drew did point me to this but I haven't tried it yet.
http://www.softwareutilities.com/

Actually I started playing around with making my own toolbar in VB but will
probably never do much with it.

--
Kent Keller
"Mark A. Bystry" wrote in message
news:A8541AC6A499A62CC8AA5BE11BAF5890@in.WebX.maYIadrTaRb...
> thanks for your input, kent. one advantage of the script over vba is that
> you cannot make custom icons in inventor like you can autocad/mdt. one
could
> either put the script on the taskbar or if you have office installed you
can
> add it to the microsoft shortcut bar. the latter works really great in
> inventor. if you minimize the the shortcut bar to the windows caption bar,
> in this case inventor's caption bar, you are able to see your icons. kind
of
> a workaround for not being able to make your own icons and macros.
>
>
>
>
0 Likes

Good points.

Drew did point me to this but I haven't tried it yet.
http://www.softwareutilities.com/

Actually I started playing around with making my own toolbar in VB but will
probably never do much with it.

--
Kent Keller
"Mark A. Bystry" wrote in message
news:A8541AC6A499A62CC8AA5BE11BAF5890@in.WebX.maYIadrTaRb...
> thanks for your input, kent. one advantage of the script over vba is that
> you cannot make custom icons in inventor like you can autocad/mdt. one
could
> either put the script on the taskbar or if you have office installed you
can
> add it to the microsoft shortcut bar. the latter works really great in
> inventor. if you minimize the the shortcut bar to the windows caption bar,
> in this case inventor's caption bar, you are able to see your icons. kind
of
> a workaround for not being able to make your own icons and macros.
>
>
>
>
Message 5 of 5
Anonymous
in reply to: Anonymous

Anonymous
Not applicable
i've got a program called ezmacro. haven't used it much in the last year but
used to use it all the time. does some pretty nice things and can be used
with any program. you can record mouse clicks and keyboard entry and run it
back. hot keys can be set up also.
0 Likes

i've got a program called ezmacro. haven't used it much in the last year but
used to use it all the time. does some pretty nice things and can be used
with any program. you can record mouse clicks and keyboard entry and run it
back. hot keys can be set up also.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report