Does Inventor Have Anything Like PTC's creo Mapkeys?

Does Inventor Have Anything Like PTC's creo Mapkeys?

ethan_howardMMXXV
Collaborator Collaborator
4,424 Views
15 Replies
Message 1 of 16

Does Inventor Have Anything Like PTC's creo Mapkeys?

ethan_howardMMXXV
Collaborator
Collaborator

Creating a Mapkey in creo means creating a shortcut for a particular task/routine tasks (such as exporting a PDF, exporting to any other formats, half-sections to x, y, or z planes...etc). It can record a process by performing clicks and can save it as a shortcut. This shortcut can be saved permanently by saving into a config.pro. Now I have a button that I can click and/or keyboard strokes for these "no-brainer" tasks.

0 Likes
Accepted solutions (3)
4,425 Views
15 Replies
Replies (15)
Message 2 of 16

CGBenner
Community Manager
Community Manager
Accepted solution

@ethan_howardMMXXV 

 

Hello and welcome!  Are you looking for something like this?  The article is old but it's basically done the same way still today.

Did you find a post helpful? Then feel free to give likes to these posts!
Did your question get successfully answered? Then just click on the 'Accept solution' button.  Thanks and Enjoy!



Chris Benner

Community Manager - NAMER / D&M


Message 3 of 16

mbystry
Enthusiast
Enthusiast
Accepted solution

Not that I'm aware of, however, I do something similar to this to automate Inventor tasks. I will write simple VB scripts to "sendkeys" to Inventor. This actually works with any Windows application.

 

Notepad sample: Save below as sendkeys.vbs

 

'VBScript Example
Set WshShell = WScript.CreateObject("WScript.Shell")

WshShell.Run "%windir%\notepad.exe"
WshShell.AppActivate "Notepad"

WScript.Sleep 2000
WshShell.SendKeys "Hello World!"
WshShell.SendKeys "{ENTER}"

wscript.quit

Message 4 of 16

Ray_Feiler
Advisor
Advisor
Accepted solution

Creating Add-Ins for Inventor | Autodesk University


Product Design & Manufacturing Collection 2024
Sometimes you just need a good old reboot.
Message 5 of 16

ethan_howardMMXXV
Collaborator
Collaborator

This is helpful and reminds me of AutoCAD's pgp file. This in combination with @Ray_Feiler suggested class might do the trick for now. Thanks! 

Message 6 of 16

ethan_howardMMXXV
Collaborator
Collaborator

Appreciate the answer @mbystry ! I do not have the experience in writing script files so it's not helpful for me but this may be helpful for others so I will "Accept Solution".

0 Likes
Message 7 of 16

ethan_howardMMXXV
Collaborator
Collaborator

@Ray_Feiler thank you for the lead.

Message 8 of 16

ethan_howardMMXXV
Collaborator
Collaborator

The answer is not as straight forward as mapkeys in creo but it appears you can get there from here.

Message 9 of 16

A.Acheson
Mentor
Mentor

@ethan_howardMMXXV 

Have you considered ilogic/VBA rules which are button controlled and can be mapped to keyboard shortcuts. There isn’t, a VBA/ macro recorder functionality unfortunately but most of the rules I collected from the helpful people on the customization forum.

The time saving is huge especially on manually tasks.I personally use a toolbox style form with my commonly used rules for PDF creation,part constraining, iproperty imports etc, sheetmetal rule changing, workplanes off, iproperties import, BOM export etc.

They aren’t keyboard linked mainly because I never operated like that but they could be or could be installed  in the ribbon tab as buttons. 

Some of the rule scripts can be as simple as just a direct copy and paste to notepad  or external rule editor and your done. 

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 10 of 16

b.mccarthy
Collaborator
Collaborator

Very nice! I have been looking for something like this. Care to share your files?

Message 11 of 16

ethan_howardMMXXV
Collaborator
Collaborator

@A.Acheson I have not considered this. I am new to Inventor and programming such as you described. creo makes the programming of such items very easy. Most Pro/E users know how to create a mapkey (macro). I wouldn't even know where to begin.

I will add this as an "accepted solution".

Thank you,

-Ethan

0 Likes
Message 12 of 16

mbystry
Enthusiast
Enthusiast

Understood. Using send keys in VB scripts is super simple. It just requires you to record whatever hotkeys brings up command. For instance, Alt F opens the file dialog, T selects the Export option, T selects the PDF option. Put all of that down in your favorite text editor and save the file as something.vbs and run it with a drawing already opened in Inventor. Voila! A very clunky way to automate tasks. 😉

 

'VBScript Example - Export DWG as PDF
Set WshShell = WScript.CreateObject("WScript.Shell")

WshShell.AppActivate "Autodesk Inventor Professional"

WScript.Sleep 2000
WshShell.SendKeys "%F"
WshShell.SendKeys "t"
WshShell.SendKeys "P"

wscript.quit

0 Likes
Message 13 of 16

A.Acheson
Mentor
Mentor

@b.mccarthy 

Sure any ones in particular?, it is just a lot of purging of unnecessary info would need to take place. 

I found this was a great kickstart to batch printing found here. https://forums.autodesk.com/t5/inventor-forum/any-way-to-automatically-update-all-related-drawings/t... 

I have added print to pdf to the drawing now attached.

 

The external rule attached to import iProperties is the first rule I started with last year, I was a complete novice to coding and still am!! really. You just need to copy and paste to the external rule location, or even use it as an internal rule first to see how it functions. You only need to change the file path and create an excel file with the information you want to import. 

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 14 of 16

b.mccarthy
Collaborator
Collaborator

Thank you, Alan.

 

The two you attached are nice (clever border!), but I was actually wondering about those displayed in the screenshots in message 9. Can those be shared? No worries, if not!

0 Likes
Message 15 of 16

A.Acheson
Mentor
Mentor

@b.mccarthy 

Unfortunately they aren't all in a shareable state at the moment, and would take some processing to get them out. If there is specific ones you wanted I can just share the links to the original source that way there is less duplication occurring.  

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 16 of 16

b.mccarthy
Collaborator
Collaborator

If it was a simple export procedure, then yes, otherwise no. I would not want you to go to any trouble.

 

Thank you!

0 Likes